Skip to content

Instantly share code, notes, and snippets.

@omidnasri
Forked from azat-co/jquery-api.md
Created September 23, 2016 08:53
Show Gist options
  • Save omidnasri/d7d6072d60b8ad2cc9a0e43a7fa05fc6 to your computer and use it in GitHub Desktop.
Save omidnasri/d7d6072d60b8ad2cc9a0e43a7fa05fc6 to your computer and use it in GitHub Desktop.
The list of most commonly used jQuery API functions

Here is the list of most commonly used jQuery API functions:

  • find(): Selects elements based on the provided selector string
  • hide(): Hides an element if it was visible
  • show(): Shows an element if it was hidden
  • html(): Gets or sets an inner HTML of an element
  • append() Injects an element into the DOM after the selected element
  • prepend() Injects an element into the DOM before the selected element
  • on(): Attaches an event listener to an element
  • off() Detaches an event listener from an element
  • css(): Gets or sets the style attribute value of an element
  • attr() Gets or sets any attribute of an element
  • val(): Gets or sets the value attribute of an element
  • text(): Gets the combined text of an element and its children
  • each(): Iterates over a set of matched elements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment