I am tempted to make some custom attributes for some page elements to make it easier to select using a function .attr();in jQuery.
I believe this is probably not recommended, as there is great flexibility in jQuery and javaScript, which, as a beginner, I have not yet learned to use all my features.
Besides creating cryptographic identifiers or adding a large number of classes, what are some ways to add additional information to my divs and other page elements for easy selection with a selector $()?
I'm most curious about the pros and cons, and what kind of memory problems or performance issues arise based on different approaches.
source
share