materialize icon indicating copy to clipboard operation
materialize copied to clipboard

js behavior and styling on same class

Open sentbyravens opened this issue 9 years ago • 2 comments

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!

sentbyravens avatar Nov 04 '17 16:11 sentbyravens

We won't be changing this.

Dogfalo avatar Nov 04 '17 19:11 Dogfalo

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?

sentbyravens avatar Nov 06 '17 12:11 sentbyravens