javascript - Add hide parameter to script -


hi have following script , i'm trying add show , hide feature instead of having 1 hide , show it. "click me" shows , button hides it, fiddle example

http://jsfiddle.net/9m99g/

$(document).ready(function () {     var content = $('.below').hide();     $('.togglebtn').on('click', function () {         $(this).next('.below').slidetoggle();         return false;     }); }); 

just same .below div , slidetoggle $(this) :

$('.below').on('click', function(){     $(this).slidetoggle(); }); 

demo jsfiddle

see more slidetoggle()


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -