jQuery: The Write Less, Do More JavaScript Library

Error: Failed to load processor NavWiki
No macro or processor named 'NavWiki' found

This code is part of the the jQuery Base? module.

Style Methods

css(Key,Value)

Error: Failed to load processor param
No macro or processor named 'param' found

Description

Sets the 'Key' style parameter of every element to 'Value'. Similar to doing: element.style.Key = Value;

Examples

  $("p").css("font","14px Arial");

css(Hash)

Error: Failed to load processor param
No macro or processor named 'param' found

Description

Takes a hash of key/value pairs and runs css(Key,Value) on every matched element.

Examples

  $("p").css({
    font:"14px Arial",
    border:"1px solid #000"
  });

addClass(String)

Error: Failed to load processor param
No macro or processor named 'param' found

Description

Adds the class to every matched element. Will not add the class if the class already exists on an element.

Note that this function *adds* the class to existing classes on the object. To replace existing classes use either option below:

   $("foo").set( "className", "new classes" );
   OR $("foo").removeClass().addClass("new class");

Examples

  $("p:even").addClass("even");

removeClass(String)

Error: Failed to load processor param
No macro or processor named 'param' found

Description

Removes the class on every matched element. Will not fail if the class does not exist.

Passing no parameter removes all classes from the object.

Examples

  $("p").removeClass("even");
  $("p").removeClass();