I want to add 20px to the width of a property that is autogenerated. I found this post but I can't seem to find the appropriate solution for my problem. Javascript (+) sign concatenates instead of giving sum of variables
this is my code:
settings.autowidth ? $(self).width() : settings.width;
settings.autowidth = true, so this will return $(self).width() which is 151px.
When I want to add 20 px like this, I get 15120px
settings.autowidth ? $(self).width()+'20px' : settings.width;
The solution in the above mentioned link says I need to add some brackets, But I don't know where to place them.