Skip to content

Instantly share code, notes, and snippets.

@mildfuzz
Created October 16, 2012 12:46
Show Gist options
  • Select an option

  • Save mildfuzz/3899062 to your computer and use it in GitHub Desktop.

Select an option

Save mildfuzz/3899062 to your computer and use it in GitHub Desktop.
toggleHTML.js
$.fn.toggleHTML = function(a,b){
//toggles two HTML values of given object, defaults to A unless equal to A
$(this).html(($(this).html() == a ? b : a));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment