$

From FirebugWiki

(Difference between revisions)
Jump to: navigation, search
($ is not a shortcut for getElementById anymore (description changed))
m (Added categories)
 
Line 21: Line 21:
== See also ==
== See also ==
* [[Command Line API]]
* [[Command Line API]]
 +
 +
[[Category:Firebug]]
 +
[[Category:UI]]
 +
[[Category:API]]

Latest revision as of 00:01, 22 November 2013

This command returns a single HTML or XML element with the given id. This means it is actually a shortcut for document.querySelector().

If the JavaScript on the page already defines $ for something else (like e.g. jQuery does), it will not be overwritten by this command.

Contents

[edit] Syntax

$(selector)

[edit] Parameters

[edit] selector

Selector used to match the element to return. This follows the syntax of document.querySelector(). (required)

[edit] Examples

$("#element")

This returns the element with the id element.

[edit] See also

Personal tools