Javascript Reference
Categories: cssRule

javascript cssRule insertRule( )

@March 15, 2008, 1:22 a.m.
insertRule( )Firefox/Netscape/NN 6 IE n/a Chrome/Safari/DOM 2  

insertRule("rule", index)


Inserts a new rule (selector text and style attributes) into the current @media rule at the position indicated by the second parameter.

W3C DOM CSSRule Types

A string containing selector and curly-braced style attributes comprising the rule to be inserted.


A zero-based integer corresponding to the specified item in source code order.

Returned Value

Integer of inserted position.

Powered by Linode.