4 ms·
If it involves jQuery then it is not 3 lines. The original claim was 3 lines of Javascript. Making a claim something is only 3 lines of Javascript without inclu
by talmand 10y ago
If it involves jQuery then it is not 3 lines. The original claim was 3 lines of Javascript. Making a claim something is only 3 lines of Javascript without including the fact that jQuery is required is a disservice to the many people that made jQuery the wonderful library that it is. That is the source of my disagreement.
- dwaltrip 10y agoThat isn't a disservice to jquery. The fact that people don't explicitly mention it could actually be viewed as a demonstration of its ubiquity.
- talmand 10y agoNo, it's people becoming not being able to know the difference between jQuery and Javascript. Calling either of them the other is a disservice to both.
- nommm-nommm 10y agoI'm old. I wrote many, many, many lines of JavaScript before jQuery ever existed, I know the difference very well. Nobody is confused. Ignoring the fact that it clearly wasn't intended to be taken literally, "in 3 lines of JS" when speaking in the context of a team effort on a web application can be understood as "adding 3 additional lines to the source code." Context. There's no need to be nasty and argumentative for no reason.
- nommm-nommm 10y agoYou're being disingenuous. Firstly, "3 lines of Javascript" wasn't meant to be taken literally. Not only that but 73% of the top 100,000 websites use jQuery - if you are on a large web development project you are more likely than not using jQuery. [1] http://trends.builtwith.com/javascript/jQuery http://trends.builtwith.com/javascript/jQuery
- talmand 10y agoSince two others have completed the task with literally "3 lines of Javascript" then I'm not being disingenuous at all. I requested the 3 lines was given roughly the same example by two different people. And I know the trends around jQuery, that was not the issue at all.
- enraged_camel 10y ago>>If it involves jQuery then it is not 3 lines. The original claim was 3 lines of Javascript. jQuery is JavaScript, so...
- adrusi 10y agoJquery is many lines of javascript.
- talmand 10y agoAs pointed out, yes it is indeed Javascript. If you make use of it then you cannot claim your code is shorter in lines by choosing to not include the jQuery code. I've written a couple of small jQuery plugins and I don't claim I wrote this awesome Javascript code that does this cool thing. I say I made a jQuery plugin that does this cool thing.