Basic syntax is:
$(selector).action()
- dollar sign to define jQuery
- (selector) to "query (or find)" HTML elements
- jQuery action() to be performed on the element(s)
Examples:
$(this).hide() - hides current element
$("p").hide() - hides all paragraphs
$("p.test").hide() - hides all paragraphs with class="test"
$("#test").hide() - hides the element with id="test"
P.S. jQuery uses a combination of XPath and CSS selector syntax.
No comments:
Post a Comment