Skip to content

Instantly share code, notes, and snippets.

@trestles
Created July 30, 2014 11:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trestles/068fe1dae096dca1eeb6 to your computer and use it in GitHub Desktop.
Save trestles/068fe1dae096dca1eeb6 to your computer and use it in GitHub Desktop.
$('body').on('click','.toggle_show_add_tn_form', function(){
var menu_item_id_val=$(this).attr('data-menu-item-id');
var this_form=$('#tn-' + menu_item_id_val);
var $that=$(this);
this_form.toggle("slow",function(){
if(this_form.is(":visible")){
$that.text('hide tasting note form')
}else{
$that.text('show tasting note form')
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment