Secret ingredients to quality software


Do you use jQuery instead of JavaScript?

Last updated by Tiago Araujo on 17 Nov 2016 03:58 pm (over 4 years ago) See History

jQuery is the MUST HAVE tool for web developers. There are 3 good reasons why you should use jQuery.

  1. Cross Browsers (IE 6.0+, Firefox 2+, Safari 3.0+, Opera 9.0+, Chrome)
  2. Powerful and easy to use

    • Same selectos as CSS
    • Designer can learn it fast
    • More readable JavaScript code
  3. Plug-ins - Tons of useful plug-ins and functionalities
window.onload = function() { alert("Welcome"); }

Figure: Bad Example - Using JavaScript 'onload' event

$(document).ready(function() { alert("Welcome!"); });

Figure: Good Example - using jQuery document 'ready' event

Adam CoganAdam Cogan

We open source. This page is on GitHub