jquery - Click function .slideToggle After open -
// toggle $('#toggle').click(function() { $('.extra').slidetoggle(); }); .extra { display: none; } #toggle { cursor:pointer; width:100%; display:block; text-align: center; padding:10px 0; color:#777; }
using font awesome fa fa-chevron-down im trying make once slidetoggle has been opened changes fa fa-chevron-down
im pretty sure simple cant seem find
$('#toggle').click(function() { $('.extra').slidetoggle(400, function(){ $("#toggle .additionalclasstotheicon").toggleclass("fa-chevron-up fa-chevron-down"); }); });
where 400 duration of animation, can change whatever want. additionalclasstotheicon additional class icon can identify it.
also check documentation:
Comments
Post a Comment