Javascript functions I want to be using more often

  • $.data() – jQuery function for attaching key-value pairs or even objects to any element. Sound quite convenient.
  • $.index() – returns the index number of an element from a jQuery-selected array of elements (or probably also any array). Useful for distinguishing between sibling elements that would be difficult to differentiate otherwise.

Leave a Reply