Adding className To Button In Collection
Adding className To Button In Collection
Hi again.
Using jQuery, I can easily add a className to a dt-button, but I'm struggling to add a className to a button inside a collection.
Here is demo.
Press 'Add Class All Buttons' and the className 'nohover' has been added to all top-level buttons, except the three buttons inside the button named "Collection."
Press 'Add Class To Button 1 of Collection' fails to add className, despite several jQuery attempts. Just can't figure-out how to call the right element.
Would very much appreciate any guidance.
Thank you in advance, as always.
Charles
This question has an accepted answers - jump to answer
Answers
Try using
button().node()
instead of direct jquery selectors.Kevin
Love you kthorngren. That worked!
I've updated the demo to reflect your solution.
c