-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
59d0586
commit 7104252
Showing
2 changed files
with
17 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
#StyleRule | ||
|
||
StyleRule adds the ability to manage css style rules with javascript. | ||
Cross-browser css style rules management from javascript. | ||
|
||
##Example | ||
|
||
var index_red = StyleRule.add("body", "background: red;"); | ||
var index_yellow = StyleRule.add("body", "background: yellow;"); | ||
var index_blue = StyleRule.add("body", "background: blue;"); | ||
var index_brown = StyleRule.add("body", "background: brown;"); | ||
|
||
var styleRule = new StyleRule(); | ||
var index_red = styleRule.add("body", "background: red;"); | ||
var index_yellow = styleRule.add("body", "background: yellow;"); | ||
var index_blue = styleRule.add("body", "background: blue;"); | ||
var index_brown = styleRule.add("body", "background: brown;"); | ||
|
||
StyleRule.replace(index_blue, "body", "background: violet;"); | ||
StyleRule.remove(index_yellow); | ||
styleRule.replace(index_blue, "body", "background: violet;"); | ||
styleRule.remove(index_yellow); |
This file contains 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