Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author philbuchanan

    (@philbuchanan)

    Hi Georg,

    The accordion items are all automatically initialized when the page first loads. The plugin does not watch for additional accordion items that may be added dynamically. For any accordion items added via ajax, you will have to manually initialize them after they have been added to the page. For example:

    jQuery('.js-accordion-item').accordionBlockItem({
    	initiallyOpen: jQuery(this).data('initially-open'),
    	autoClose:     jQuery(this).data('auto-close'),
    	clickToClose:  jQuery(this).data('click-to-close'),
    	scroll:        jQuery(this).data('scroll'),
    	scrollOffset:  jQuery(this).data('scroll-offset'),
    });
    Thread Starter georg03

    (@georgdem)

    Hello Phil,

    thank you for the information! I was able to reinitialize all accordions with adding either your code or $(“.js-accordion-item”).accordionBlockItem( “refresh” ); to my ajax click function.

    However the .no-js class is still being added to all accordions after using the ajax filter. Any idea?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Ajax filter categories no-js trigger’ is closed to new replies.