Johann-S / bs-customizer

Create a custom Bootstrap 4.x build
https://johann-s.github.io/bs-customizer/
MIT License
17 stars 2 forks source link

Add js prefix to elements where custom js is applied to #45

Closed MartijnCuppens closed 5 years ago

MartijnCuppens commented 5 years ago

Use classes with .js- prefix for elements where custom javascript is applied to.

Closes #40.

XhmikosR commented 5 years ago

IMO there's nothing wrong in using IDs in JS, and in fact it should be always faster.

MartijnCuppens commented 5 years ago

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?

Johann-S commented 5 years ago

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

Johann-S commented 5 years ago

Can you update your PR @MartijnCuppens ? And I'll merge it 👍

MartijnCuppens commented 5 years ago

Updated ;)

XhmikosR commented 5 years ago

@MartijnCuppens: that's not a rebase :P

MartijnCuppens commented 5 years ago

@XhmikosR does it matter if it's a merge or rebase?

XhmikosR commented 5 years ago

Definitely. In this case, it cannot be merged at all.

MartijnCuppens commented 5 years ago

@XhmikosR, I've rebased this PR.

Johann-S commented 5 years ago

Sorry @MartijnCuppens again an other rebase 😆 do not hesitate to merge your PR 😉

XhmikosR commented 5 years ago

@MartijnCuppens I had already rebased it, don't overwrite the branch.

MartijnCuppens commented 5 years ago

Ow, that was going on, sec I'll fix it.

Edit: nvm, looks ok now

XhmikosR commented 5 years ago

It's already fixed :P