Re:32 Javascript Alternatives with Pure CSS – Updated
by mcdaid on Thursday May 19, 2011 @04:29PM
(#2565302)
This is only the case if the user has not got a cached version of jQuery, which is likely if something like google's hosting service. In this case the jQuery code may well be shorter than the css especially with all the browser specific rules. In addition the jQuery version will work in all browsers.
Also, if you're using jQuery (or some other framework) you necessarily add several kB to the file size before you even write any code. While a single style might be on the order of a few hundred bytes. Remember, bandwidth is money and cutting down anywhere you can is important (just ask Google).
This won't hold true for all cases, but seeing these examples has already cause me to think of several ways in which it would. Anyway, creativity loves options! So it’s definitely worth reading.