jquery - slideToggle callback function not working -


i have button uses slidetoggle() method show hide element. trying change value of button once slideup complete. have tried using callback function change value can't work.

$('#togglefilters').click(function(){     var el = $(this);     $('.formselect').slidetoggle(['slow','swing'], function() {      if($(this).is(":hidden")) {         $(el).val('show filters');     } else {         $(el).val('hide filters');     }     }); }); 

if can point me in right direction appreciated?

cheers graham

ok didn't bother looking @ slidetoggle() call in end , went classtoggle function instead.

$('.showhidefilters').click(function() {         $(this).toggleclass('shown');         $('.formselect').slidetoggle(['slow','swing']); }); 

Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -