OpenSource For You

JQuery selectors and events

-

jQuery selectors: These allow us to select an HTML element and, after doing so, easily perform any action or event on it. We can select elements in three ways. 1. Based on the element name

Example: $(“p”) 2. Based on the element’s ID attribute

Example: $(“#elementIdN­ame”) 3. Based on the element’s class attribute

Example: $(“.elementCla­ssName”) jQuery events: These occur when the following events occur: moving a mouse over an element submitting a form

Newspapers in English

Newspapers from India