Reputation: 197
I have a variable:
var options = {'transition-duration': dataspeed + 'ms',
'transition-timing-function': dataeasing,
'transition-delay': datadelay + 'ms'};
Then I'm trying to use this variable in:
$(this).css({'opacity':'1'}, options);
The opacity works fine but the variable options are not passed.
Upvotes: 1
Views: 53
Reputation: 816252
You can also merge both objects:
$(this).css($.extend({'opacity':'1'}, options));
Upvotes: 0