You can do this in a few different ways in YumJS too.
One of the easiest is getting the first of a class:
// Get first oneletbutton=yum('.button').first;// Get the entire collection with the underscoreletbuttons=yum('.button')._;// Use the variable reference you just madeyum(buttons).text('We are buttons');
Aside from a the familiar chainable syntax, YumJS is very different than JQuery.
It doesn't replicate all of JQuery's functions but it does do other things that JQuery doesn't do with regard to reactivity and an optional component style syntax both of which can be mixed!
YumJS is also super small too. So...if you are still using JQuery give YumJS a try.
You can do this in a few different ways in YumJS too.
One of the easiest is getting the first of a class:
Aside from a the familiar chainable syntax, YumJS is very different than JQuery.
It doesn't replicate all of JQuery's functions but it does do other things that JQuery doesn't do with regard to reactivity and an optional component style syntax both of which can be mixed!
YumJS is also super small too. So...if you are still using JQuery give YumJS a try.
Check out my introductory article here on Dev.to dev.to/bretgeek/introducing-yumjs-...