What are all the advantages of jQuery?
27th October 2010
My answer to What are all the advantages of jQuery? on Quora
jQuery’s API is astonishingly well designed. It’s extremely consistent once you learn its rules (e.g. methods often take one argument to read a value and two arguments to set one, e.g. .css(), .attr(), .width(), .height()) and its functionality is so complete that the last few major releases of the library have hardly added any new methods at all.
jQuery’s performance improves noticeably with every release, with the API staying exactly the same.
jQuery plays extremely well with other code. It doesn’t extend any built-in JavaScript objects, and it only adds one symbol to the global namespace (the jQuery symbol)—it aliases $ as well, but you can undo that with jQuery.noConflict().
Even discounting browser differences, jQuery is an enormous improvement on the DOM. It makes DOM manipulation extremely easy, which means it’s much easier to implement things using progressive enhancement—taking existing DOM elements on the page and enhancing their behaviour.
More recent articles
- AI for Data Journalism: demonstrating what we can do with this stuff right now - 17th April 2024
- Three major LLM releases in 24 hours (plus weeknotes) - 10th April 2024
- Building files-to-prompt entirely using Claude 3 Opus - 8th April 2024
- Running OCR against PDFs and images directly in your browser - 30th March 2024
- llm cmd undo last git commit - a new plugin for LLM - 26th March 2024
- Building and testing C extensions for SQLite with ChatGPT Code Interpreter - 23rd March 2024
- Claude and ChatGPT for ad-hoc sidequests - 22nd March 2024
- Weeknotes: the aftermath of NICAR - 16th March 2024
- The GPT-4 barrier has finally been broken - 8th March 2024
- Prompt injection and jailbreaking are not the same thing - 5th March 2024