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

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -