Skip to content
joesimmons edited this page Dec 4, 2013 · 2 revisions

Adds more elements to the current JSL object.




Syntax: JSL.add( selector [, context] );
note: accepts the same arguments as the main JSL function


Arguments:

  • selector: [string/element] A CSS selector or an element (note: if you pass an element, the second argument will not be used).
  • context: (optional) [string/element] A CSS selector or an element to use as the base in which the selector string will search.

Example:

// add .bar to the original JSL object of .foo
// then hide all the elements found
JSL('.foo').add('.bar').hide();
Clone this wiki locally