3 ms·
Are we all writing small jQuery scripts right into the HTML in a script tag? This post suggests that practice. I can see it being the faster option for just a 1
by halisaurus 13y ago
Are we all writing small jQuery scripts right into the HTML in a script tag? This post suggests that practice. I can see it being the faster option for just a 1-3 line script, what's the tipping point when we move it to an independent (minified) .js file? Is that just a readability issue? And why do I need all of jQuery to add/remove a class from one element?
It seems there's a conflict here: Either there's little JS and no need for jQuery, or a lot of JS and no sense in dropping it in the HTML.
- kaonashi 13y agoThe js was just to add and remove the class; it was inline for documentation purposes.