Skip to content

Instantly share code, notes, and snippets.

@jackfranklin
Created March 19, 2012 21:28
Show Gist options
  • Save jackfranklin/2127254 to your computer and use it in GitHub Desktop.
Save jackfranklin/2127254 to your computer and use it in GitHub Desktop.
Rewrite?
if(options.slide == 'up') { $(this).slideUp(time, options.callback);} // slide Up
else if(options.slide == 'down') { $(this).slideDown(time, options.callback);} // slide down
else if(options.slide == 'toggle') {$(this).slideToggle(time, options.callback);} // slide toggle
$(this)["slide" + options.slide.charAt(0).toUpperCase() + options.slide.slice(1)](time, options.callback);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment