Last active
November 28, 2016 19:23
-
-
Save dustinpoissant/7828a80d2899c57d92472b59675fc3fa to your computer and use it in GitHub Desktop.
Check if a CSS property/value is valid.
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
function validCSS(property, value){ | |
var $el = $("<div></div>"); | |
$el.css(property, value); | |
return ($el.css(property) == value); | |
} |
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
function validCSS(a,b){var c=$("<div></div>");return c.css(a,b),c.css(a)==b} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment