g(..).setHTML(html)

Sets the .innerHTML property of all elements in the Gimme Object's internal array.

Returns: Itself (the same Gimme Object is returned so additional methods can be chained together seamlessly).
Params:
  • html, required: a string of HTML markup that will be assigned to the .innerHTML property of each element in the Gimme Object's internal array.

Examples:
// set the .innerHTML of all <p> elements that have the class "happy" to "We are happy paragraphs!"
g('p.happy').setHTML('We are happy paragraphs!');

// set the .innerHTML of #someElem to "Funny llama, fuzzy llama, llama llama, duck"
g('#someElem').setHTML('Funny llama, fuzzy llama, llama llama, duck!');



Last edited Jun 7, 2007 at 6:31 PM by sstchur, version 1

Comments

No comments yet.