Closed MartijnCuppens closed 5 years ago
IMO there's nothing wrong in using IDs in JS, and in fact it should be always faster.
IMO there's nothing wrong in using IDs in JS, and in fact it should be always faster.
I personally don't like to mix class and id selectors, but you have a point that they are slightly faster. @Johann-S, what do you think?
We have few elements in our index.html so our perf won't change a lot, and it it bother us a lot we can query our elements with native methods
Can you update your PR @MartijnCuppens ? And I'll merge it 👍
Updated ;)
@MartijnCuppens: that's not a rebase :P
@XhmikosR does it matter if it's a merge or rebase?
Definitely. In this case, it cannot be merged at all.
@XhmikosR, I've rebased this PR.
Sorry @MartijnCuppens again an other rebase 😆 do not hesitate to merge your PR 😉
@MartijnCuppens I had already rebased it, don't overwrite the branch.
Ow, that was going on, sec I'll fix it.
Edit: nvm, looks ok now
It's already fixed :P
Use classes with
.js-
prefix for elements where custom javascript is applied to.Closes #40.