jQuery show/hide slideToggle not working -
i tried integrate faq template magento store's "1 column layout".
show/hide toggle not working expected, hides duration(400) over. can check live at: http://nutrija.com/faq
jquery(document).ready(function($){ var faqtrigger = $('.cd-faq-trigger'), //show faq content clicking on faqtrigger faqtrigger.on('click', function(event){ event.preventdefault(); $(this).next('.cd-faq-content').slidetoggle(400).end().parent('li').toggleclass('content-visible'); }); }
i tried changing few parameters failed, kindly help.
do content-visible
class toggle in slidetoggle callback
var faqtrigger = $('.cd-faq-trigger'), //show faq content clicking on faqtrigger faqtrigger.on('click', function(event){ event.preventdefault(); $(this).next('.cd-faq-content').slidetoggle(400, function(){ //add toggle class here faqtrigger.parent('li').toggleclass('content-visible'); }); }); }
jquery slidetoggle
No comments:
Post a Comment