CSS class in jquery

The problem with id selectors is that they are notoriously difficult when it comes to specificity, resulting in crazy selectors just to achieve anything. When an id selector is being used, no class selector is capable of modifying it, so you end up with a lot more complications.

For more on this, see Don’t use IDs in CSS selectors.

2 Likes