Tag Archives: toggele

set jquery toggele default as a hidden

<button class="submit" id="leavecomment">LEAVE A COMMENT</button>

custom.js

jQuery(document).ready(function(){
	
	var togglehide = jQuery(".comment-form");
  	jQuery(togglehide).hide();
  
		jQuery("#leavecomment").click(function(e){
			 	jQuery(togglehide).slideToggle('fast');
			 	e.preventDefault();
			});
});
Advertisements
%d bloggers like this: