Reputation: 2783
I need to call a function in the following fashion:
var f = 'fadeOut';
$(v).f(s, function(){
$(v).css('visibility', 'hidden').css('position', 'absolute');
});
Is this possible to do simply?
Upvotes: 6
Views: 293
Reputation: 82375
Yes
var f = 'fadeOut';
$(v)[f](s, function(){
$(v).css('visibility', 'hidden').css('position', 'absolute');
});
Upvotes: 8