We continue to learn more on Javascript and our journey next step is to take on JQuery programming. JQuery is a javascript library. jQuery is a collection of javascript routines in order to simplify JavaScript programming. Let start learning on its way of programming.

Get Started with Action

butters stotch reading GIF by South Park
  • Let work a simple example to have buttons to add/remove text paragraph big class. and hide/show paragraph.
  • Working with a HTML with 1 paragraph text and 4 buttons to be call by JQuery.
  • When the button is triggered, JQuery code is to called.
    • $("p").show("");
      • The $ identify as JQuery follow by the target CSS selector. $("p") is selecting paragraph selector. Having $("div, p"), allow you to select div and paragraph at the time.
      • Dot . is separates the target action with action to hide follow by semicolon ;
    • addClass("big")
      • Add a class to call big selector to double the size of the text.
      • You can have more eg addClass("big bright heavy");
  • JQuery can also writes as
    • JQuery("p").hide();
    • window.$("img").hide();
    • window.JQuery("img").hide();

Finally, we add 1 more to important text to with CSS important wit font family.

Enjoy your learning and take care.


This free site is ad-supported. Learn more