Issue Description
Trying to dynamically update a data attribute on a element using the .data('attr')
method doesn’t get picked up, despite the DOM being updated initially.
How to Fix the Issue
Instead of using .data('attr')
to get, and then change, the attribute you should use .attr('data-attr');
instead.
References
Reference Description |
Reference Link |
---|---|
Stack Overflow Comments |
View Page |