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
$(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(); }); see more slidetoggle()
Comments
Post a Comment