Collapsing option blocks
-
Hi
I have few option blocks and each has multiple options. All are checkboxes. As a result, resulting product page is rather ugly with long list of options.
So, I would love to be able to “collapse” option sections accordion style.
I did not find an option in plugin to do so, so decided to implement my own with following JS code:
jQuery(document).ready(function($) {
$('.addon-header').on('click', function() {
$(this).next('.options-container.default-closed').slideToggle();
$(this).toggleClass('active');
});
});Well, this works when page is loaded, but changing product attribute causes AJAX reloading of Yith option container which breaks the JS code above and it stops working. Here is a page:
Can you suggest a way to collapse option blocks?
- You must be logged in to reply to this topic.