javascript - Calling jQuery function by var reference -
javascript - Calling jQuery function by var reference -
i'm trying alter jquery function called using value of switch. in particular case grab selector utilize whatever value of 'direction phone call on jquery function.
$('#'+the_name).value_of_switch(options.speed_up);
how can accomplish this?
switch(direction){ case 'up': direction = 'slidedown'; break; case 'down': direction = 'slideup'; break; } $('#'+the_name).slidedown(options.speed_up);
not sure mean, help?
$('#'+the_name)["your string value here"](options.speed_up);
javascript jquery jquery-plugins
Comments
Post a Comment