List of selectors in jQuery





  1. jQuery selectors are the one of the most important aspects of the jQuery library.
  2. They allows you to select and manipulate HTML elements as a group or as a single element. jQuery selectors support the Cascading style Sheet (CSS) syntax to select HTML elements by element name, attribute name, or content. 
  3. jQuery also provides the CSS selector to change CSS properties of HTML elements.

The following are the selectors supported by jQuery:

  •  attribute
    returns all the elements from the group of elements matching specified attribute.

  • returns all the elements from the group of elements matching specified attribute value.
  •  attributeValueValue - 
    returns all the elements from the group of elements matching specified attribute value.
  •  animated - 
    returns elements on the page on which animation is performed.
  •  button
    returns all input elements with type button.
  •  checkbox
    returns all input elements with type checkbox.
  •  checked
    returns all the checked input elements from the group of elements.
  •  classclass - 
    returns all the element with the specified class names, use to select elements having multiple classes assigned.
  •  class
    returns all the element with the specified class.
  •  contains
    returns elements that contains text matching the specified text.
  •  disabled
    returns all disabled input elements.
  •  element
    returns all the element with the specified element name.
  •  empty
    returns all elements that do not have child element nodes.
  •  enabled
    returns all enabled input elements.
  •  equal
    returns the elements at the specified index in the page.
  •  even
    selects all the elements at even position in the page.
  •  file
    returns all input elements with type file.
  •  firstreturns the first element from the group of elements.
  •  greater
    returns a list of element with index greater than specified index.
  •  header
    returns all the header elements on the page such as h3,h3,h5 etc.
  •  hidden
    returns all hidden elements in the page.
  •  id
    returns the element with the specified id.
  •  image
    returns all input elements with type image.
  •  input
    returns all input elements.
  •  last
    returns the last element from the group of elements.
  •  lessthan
    returns a list of element with index less than specified index.
  •  not
    returns elements that does not satisfy the specified condition.
  •  odd
    selects all the elements at odd position in the page.
  •  password
    returns all input elements with type password.
  •  radio
    returns all input elements with type radio.
  •  reset
    returns all input elements with type reset.
  •  selected
    returns all selected input elements.
  •  star
    selects all the elements in the page.
  •  submit
    returns all input elements with type submit.
  •  textreturns all input elements with type text.
  •  visible
    returns all visible elements, elements that are not hidden.

0 comments:

Post a Comment