Thursday, June 1, 2017

jQuery




💥 jQuery is a JavaScript Library.

💥  jQuery greatly simplifies JavaScript programming.  
💥 The purpose of jQuery is to make it much easier to use JavaScript on your website.

💦 jQuery Syntax

Basic syntax is: $(selector).action()
  • A $ sign to define/access jQuery
  • A (selector) to "query (or find)" HTML elements
  • A jQuery action() to be performed on the element(s)
 
 

💦 jQuery Selectors

      👦The element Selector

              You can select all <p> elements on a page like this:
$("p") 
 
 
    👦The  #id selector

      An id should be unique within a page, so you should use the #id selector when you want to find a single, unique element.
$("#test") 
 
     👦 The . class selector

     To find elements with a specific class, write a period character, followed by the name of the class:
$(".test") 
 
 

 



  

No comments:

Post a Comment