<p>I am trying to convince those who set standards at my current organization that we should use jQuery rather than Prototype and/or YUI. What are some convincing advantages I can use to convince them?</p>

[{'answer_id': 67074, 'author': 'palehorse', 'author_id': 312, 'author_profile': 'https://Stackoverflow.com/users/312', 'pm_score': 2, 'selected': False, 'text': '<p>One advantage of jQuery is the large community which has developed a multitude of plugins.</p>\n'}, {'answer_id': 67079, 'author': 'Jahangir', 'author_id': 6927, 'author_profile': 'https://Stackoverflow.com/users/6927', 'pm_score': 5, 'selected': False, 'text': '<p>The 3 main advantages of jQuery are:</p>\n\n<ul>\n<li>its light weight when compared to other javascript frameworks</li>\n<li>it has a wide range of <a href="http://plugins.jquery.com/" rel="nofollow noreferrer">plugins</a> available for various specific needs</li>\n<li>it is easier for a designer to learn jQuery as it uses familiar CSS syntax. jQuery is  <a href="http://www.sitepoint.com/article/jquery-javascipt-designers/" rel="nofollow noreferrer">Javascript for Designers</a></li>\n</ul>\n'}, {'answer_id': 67113, 'author': 'dawnerd', 'author_id': 69503, 'author_profile': 'https://Stackoverflow.com/users/69503', 'pm_score': 1, 'selected': False, 'text': '<p>I am a Prototype person, but I\'ve used jQuery a bit. Honestly I don\'t there is much between the two that you can use as a \'selling point\'. The YUI on the other hand is pretty bloated. I would never use it on any commercial grade application.</p>\n\n<p>I found <a href="http://www.barneyb.com/barneyblog/2008/05/07/prototype-and-jquery/" rel="nofollow noreferrer">this page</a> that talks about this exact subject.</p>\n'}, {'answer_id': 67144, 'author': 'user10109', 'author_id': 10109, 'author_profile': 'https://Stackoverflow.com/users/10109', 'pm_score': 3, 'selected': False, 'text': "<p>In my opinion, having briefly tried Prototype, and then later trying and loving jQuery: the jQuery API just feels much cleaner and well thought out.  John Resig, the creator/architect of jQuery really knows his stuff, and it shows in the design of jQuery, as well as the various other impressive JavaScript projects that he has been a part of.</p>\n\n<p>The whole concepts of querying and chainability fit very well with DOM manipulation, which seems to be the brunt of what people use JS libraries for.  The online documentation is fantastic.  Performance seems to be very good as well.  The entire library fits into a relatively small package given it's capabilities.  The plugin architecture is also very nice for extensibility.</p>\n\n<p>I honestly haven't tried YUI, so I can't comment much on that.  I do know that it is a rather massive library in total, though you can choose to download/use only specific modules of it.</p>\n"}, {'answer_id': 67245, 'author': 'Erlend Halvorsen', 'author_id': 1920, 'author_profile': 'https://Stackoverflow.com/users/1920', 'pm_score': 1, 'selected': False, 'text': "<p>Maybe you shouldn't? It all depends on what kind of application(s) you're building. If you are building GUI intensive applications, something like, say, Yahoo! Mail, then maybe you should consider using YUI or Mootools over jquery. Personally I'm a huge jQuery fan, but it is definitely best for adding a touch of interaction to an otherwise mostly static UI. On the other hand, if that is what you'll be using it for, then jquery is a lot simpler, has nicer syntax, and it has a lot of momentum. </p>\n"}, {'answer_id': 67294, 'author': 'conmulligan', 'author_id': 1467, 'author_profile': 'https://Stackoverflow.com/users/1467', 'pm_score': 2, 'selected': False, 'text': "<ol>\n<li><p>It's very small, especially when minified, and offers a lot in the core library.</p></li>\n<li><p>It's also easy to extend, and has an active community.</p></li>\n<li>Finally, it's extremely easy to learn; once you've grasped the core concepts you can start coding complex solutions right away.</li>\n</ol>\n"}, {'answer_id': 67295, 'author': 'SaaS Developer', 'author_id': 7215, 'author_profile': 'https://Stackoverflow.com/users/7215', 'pm_score': 4, 'selected': False, 'text': "<p>I would say my top reasons for using JQuery are:</p>\n\n<ul>\n<li>Large development community and many plugins.  </li>\n<li>It's on Microsoft's radar and they are adding some plugin support and\ndebug capabilities.</li>\n<li>Very good documentation for a 3rd party library.</li>\n<li>Lightweight.</li>\n<li>Chaining capabilities are very powerful.</li>\n</ul>\n"}, {'answer_id': 67337, 'author': 'Nathan Long', 'author_id': 4376, 'author_profile': 'https://Stackoverflow.com/users/4376', 'pm_score': 0, 'selected': False, 'text': '<p>Why don\'t you create a quick comparison? </p>\n\n<p>Take a task like "find all divs or tables which contain images of class foo and attach a click event to each of them which makes them expand 50%." Or something more relevant to what you\'re doing.</p>\n\n<p>Then code that with jQuery, Prototype, etc, and compare. Which is shorter? Easier to read? Faster to run? (You can find a speed comparison <a href="http://mootools.net/slickspeed" rel="nofollow noreferrer">here</a>.)</p>\n'}, {'answer_id': 67363, 'author': 'Nathan Long', 'author_id': 4376, 'author_profile': 'https://Stackoverflow.com/users/4376', 'pm_score': 2, 'selected': False, 'text': "<p>One argument in favor is this:</p>\n\n<p>popularity + extensibility</p>\n\n<p>1) If anyone needs to do X with JavaScript, it's probably been done with jQuery<br>\n2) If it's been done much, there's probably a plugin, if not native support</p>\n\n<p>And if it's <strong>really</strong> unique, there are a lot of people to answer your question on SO or elsewhere.</p>\n"}, {'answer_id': 67547, 'author': 'MattMcKnight', 'author_id': 8136, 'author_profile': 'https://Stackoverflow.com/users/8136', 'pm_score': 1, 'selected': False, 'text': '<p>It has a good set of plugins and the coding style is unobtrusive which means it\'s not too hard to replace.  There is also a nice drop in replacement for Ruby on Rails helpers called jRails.</p>\n\n<p>Performance-wise they are all pretty close: <a href="http://www.kenzomedia.com/speedtest/" rel="nofollow noreferrer">http://www.kenzomedia.com/speedtest/</a>  However, MooTools, dojo, ext, and Prototype all run faster in my environment.</p>\n\n<p><strong>My question is- why do you want to use it? Is it just because you know it better?</strong></p>\n'}, {'answer_id': 68363, 'author': 'Mike', 'author_id': 1115144, 'author_profile': 'https://Stackoverflow.com/users/1115144', 'pm_score': 1, 'selected': False, 'text': '<p>Jquery has been around for a few years, so like everyone else has said, it has a deep community, lots of plug-ins, and decent support.  What set it aside for me was that it\'s easy to learn.  </p>\n\n<p>See <a href="http://visualjquery.com/1.1.2.html" rel="nofollow noreferrer">http://visualjquery.com/1.1.2.html</a></p>\n'}, {'answer_id': 72737, 'author': 'Michael Thompson', 'author_id': 12276, 'author_profile': 'https://Stackoverflow.com/users/12276', 'pm_score': 3, 'selected': False, 'text': "<p>It's the most well thought out language you'll find -- it's almost intuitive.</p>\n\n<p>Want an element's width?</p>\n\n<pre><code>$('#something').width();\n</code></pre>\n\n<p>Want to grab an element, hide it, change its background color and fade it back in?</p>\n\n<pre><code>$('#something').hide().css('background', 'red').fadeIn();\n</code></pre>\n\n<p>How about table striping for IE (assuming <code>hover</code> class is defined)?</p>\n\n<pre><code>$('table tr').hover(function() {\n  $(this).addClass('hover');\n});\n</code></pre>\n\n<p>It's quick, mindless work like this that really helps sell jQuery.</p>\n"}, {'answer_id': 76556, 'author': 'Guichard', 'author_id': 13628, 'author_profile': 'https://Stackoverflow.com/users/13628', 'pm_score': 3, 'selected': False, 'text': '<p>Here\'s a more recent speed test than the one provided above.  Last time I ran it dojo was the fastest followed by jQuery, Mootools, Prototype, and finally YUI.  Note I ran it in Firefox 3 and the speeds vary between browsers so test it out yourself.</p>\n\n<p><a href="http://mootools.net/slickspeed/" rel="noreferrer">Slick Speed Test</a></p>\n'}, {'answer_id': 251436, 'author': 'Andrew Van Slaars', 'author_id': 8087, 'author_profile': 'https://Stackoverflow.com/users/8087', 'pm_score': 0, 'selected': False, 'text': "<p>If you are trying to convince people from a business perspective, Microsoft's recent decision to ship jQuery with Visual Studio could help establish some additional credibility. Then again, that could hurt your cause, depending on their opinions of Microsoft.</p>\n"}, {'answer_id': 252163, 'author': 'Dean', 'author_id': 32936, 'author_profile': 'https://Stackoverflow.com/users/32936', 'pm_score': 1, 'selected': False, 'text': '<p>I have been using jQuery for a few months now and have found it an enjoyable experience.  The framework is clear and concise it has a great plugin architecture and is very well supported but frameworks are a very personal thing though and you should probably try a few it doesn\'t normally take long to spot the one that feels best for you.</p>\n\n<p>Not sure if this will matter to you but Microsoft recently announced support for jQuery in the next update for VS 2008 <a href="http://weblogs.asp.net/scottgu/archive/2008/09/28/jquery-and-microsoft.aspx" rel="nofollow noreferrer">Here is the blog post</a>.</p>\n\n<p>You can hear the John Resig, the guy behind jQuery, talking about it a various other frameworks on a recent <a href="http://boagworld.com/podcast/135/" rel="nofollow noreferrer">Boagworld podcast</a>.  It might help you make up your mind its a pretty balanced piece.</p>\n'}, {'answer_id': 3358679, 'author': 'sandhya shendre', 'author_id': 405160, 'author_profile': 'https://Stackoverflow.com/users/405160', 'pm_score': 2, 'selected': False, 'text': '<p>You can follow <a href="http://www.codedigest.com/Articles/jQuery/273_Introduction_to_jQuery_in_ASPNet_and_10_Advantages_to_Choose_jQuery.aspx" rel="nofollow noreferrer">this link</a> to know more about jQuery, why to use it and what are it\'s advantages are.</p>\n'}, {'answer_id': 5637865, 'author': 'Matter', 'author_id': 642121, 'author_profile': 'https://Stackoverflow.com/users/642121', 'pm_score': 2, 'selected': False, 'text': '<p>Empirically each has their own strengths and weaknesses given a very specific role within your applications. Making a global determination may not be the most appropriate approach.  Carve out the specific task at hand and analyze performance, bloat, experience etc then make a specific decision / proposal.</p>\n'}, {'answer_id': 8296056, 'author': 'Ruben Oliveira', 'author_id': 1069351, 'author_profile': 'https://Stackoverflow.com/users/1069351', 'pm_score': 2, 'selected': False, 'text': '<p>Well...</p>\n\n<p>First you should think about why you think jQuery is good but you don\'t know what arguments to use to convince another. Perhaps you should convince yourself first. ;)</p>\n\n<p>Anyway, jQuery is just another framework. You should use for what it does best. If your going to use it just for basic DOM handling, forget it! learn how to use js properly and you will be fine!</p>\n\n<p>Consider this HTML:</p>\n\n<pre><code>&lt;body&gt;\n&lt;div style="width: 400px; height: 400px; background-color: red"&gt;\n&lt;div style="width: 400px; height: 400px; background-color: red"&gt;\n&lt;/div&gt;\n\n&lt;script type="text/javascript"&gt;\n\nfunction test1 (){\ndocument.body.innerHTML = ""\n\nvar div = document.createElement("div");\n\ndocument.body.appendChild(div);\n\n$(div).width("400px").height("400px").css("background-color", "red");\n}    \n\nfunction test2 (){\ndocument.body.innerHTML = ""\n\nvar div = document.createElement("div");\n\ndocument.body.appendChild(div);\n\n$(div).width("400px");\n$(div).height("400px");\n$(div).css("background-color", "red");\n}\n\nfunction test3 (){\ndocument.body.innerHTML = ""\n\nvar div = document.createElement("div");\n\ndocument.body.appendChild(div);\n\ndiv.style.width = "400px";\ndiv.style.height= "400px";\ndiv.style.backgroundColor = "red";\n}\n\nfunction test4 (){\n    document.body.innerHTML = ""\n\n    var div = document.createElement("div");\n\n    document.body.appendChild(div);\n\n    div.setAttribute("style", "width: 400px; height: 400px; background-color: red");\n}\n\n&lt;/script&gt;\n&lt;/body&gt;\n</code></pre>\n\n<p>Put it in a hml file with jquery available in <code>&lt;head&gt;</code></p>\n\n<p>Then, open firebug and run this code:\n    console.profile();\n    test1();\n    console.profileEnd();</p>\n\n<pre><code>console.profile();\ntest2();\nconsole.profileEnd();\n\nconsole.profile();\ntest3();\nconsole.profileEnd();\n\nconsole.profile();\ntest4();\nconsole.profileEnd();\n</code></pre>\n\n<p>See the results for your self!</p>\n\n<p>But if you want do some complex manipulation on the DOM that would require you to make several loops or find out with elements on the DOM match some criteria, you can consider to use jQuery since it will implement this procedures for you.</p>\n\n<p>Anyway, keep in mind that there is nothing better than controlling the DOM with references you keep in your code. Its faster and more readable to others. Google "js best practices".</p>\n\n<p>I use jQuery for complex things that it would take me too long to implement and would end up with something like jQuery\'s code. In that case, it makes sense to use it!</p>\n\n<p>Have fun!</p>\n'}]
['https://Stackoverflow.com/questions/67045', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/-1/']