forum

Home / DeveloperSection / Forums / Jquery during slideToggle() class change event

Jquery during slideToggle() class change event

Mark Devid 2617 11-May-2013
Hi Expert!

Hi there I would like to use slideToggle for a drop down the matter I struck ed there was am trying to toggle swap a anchor element's class in the parent div while 

Slidedown .foo class and while slideup .eee class should apply and a likely demo for this question is here

$(".select_type").click(function(){
 var id=$(this).attr('id');
 $("#"+id+"_drop").slideToggle(function(){
 if($(this).is(':visible')){  $("#"+id+" a").addClass("foo"); }
 })
 }) 

Thanks in advance! 


Updated on 11-May-2013

Can you answer this question?


Answer

1 Answers

Liked By