Do you use jQuery instead of JavaScript?

Updated by Brook Jeynes [SSW] 2 years ago. See history

123

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

  1. Cross Browsers (Edge, Firefox, Safari, Opera, Chrome)
  2. Powerful and easy to use
    • Same selectos as CSS
    • Designer can learn it fast
    • More readable JavaScript code
  3. Plugins - Tons of useful plugins and functionalities
window.onload = function () {
alert("Welcome");
};

❌ Figure: Figure: Bad example - Using JavaScript 'onload' event

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

✅ Figure: Figure: Good example - Using jQuery document 'ready' event