js behavior and styling on same class
Hi! I am about .collapsible. In my project I have 2 level of accordions with ajax data. When I click on root element it is represents me child dynamically generated accordion list. And when I click on that generated child... his parent regenerates all data! So I did remove that class and replace your $('.collapsible').collapsible(); with
module.exports = function() { return { activate: function ($container) { $container.collapsible(); } } };
and it is works fine now. But looks horrible because no more .collapsible class on elements!
Please do all js logic on data-attr (like in other frameworks) or at least not the same style classes. Thanks!
We won't be changing this.
Thank you for answer. But why? It is very important thing! Just add js- prefixes to the classnames with js logic. Or, may be I am totally wrong about how to use that framework. So how can I achieve my task with .collapsible?