Created
April 7, 2013 04:13
-
-
Save rainyjune/5328983 to your computer and use it in GitHub Desktop.
set or query the inline style of an element
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Set the style attribute of e to the string s with either of these lines: | |
e.setAttribute("style", s); | |
e.style.cssText = s; | |
// Query the inline style string of the element e with either of these: | |
s = e.getAttribute("style"); | |
s = e.style.cssText; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment