jQuery – Selector of a button with JavaScript

Today I have dealt again with JS, while reading some of the JS related books that I have to review 🙂

Thus, I have asked myself how many ways are there to make a button selector with JS/jQuery. After some time, I have come with 4 possibilities, 2 with JS and 2 with jQuery.

Thus, this is what the sample looks like:


Thus we have four buttons, each of which is selected through a separate way in JS. The code is more important, thus here it comes:

Enjoy it in GitHub as well! 🙂

Tagged with: ,