With JQuery, you can select the HTML element,and perform operations.
JQuery syntax examples
$(this).hide()
demonstrate the JQuery hide() function,hide current HTML elements.
$("#test").hide()
demonstrate the JQuery hide() function,hide id="test" elements.
$("p").hide()
demonstrate the JQuery hide() function,hide the all "p" elements.
$(".test").hide()
demonstrate the JQuery hide() function,hide class="test" elements.
JQuery syntax
JQuery syntax for the selection of HTML elements prepared,can be perform operations.
Basal syntax is:$(selector).action()
- Dollar sign define jQuery
- Selector sign (selector)query and find the HTML elements
- JQuery's action perform operations for the elements
examples:
$(this).hide() --- hide current elements
$("p").hide() --- hide all "p" elements
$("p.test").hide() --- hide all class ="test" "p" elements
$("#test").hide() --- hide all id='test' elements
Cue: JQuery uses the xpath syntax with the CSS selector syntax combination.