Created
September 25, 2013 19:49
-
-
Save MayogaX/6705060 to your computer and use it in GitHub Desktop.
jquery add class for all buttons that hasn't
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
$(":button").each(function () { | |
if (!$(this).hasClass('btn')) { | |
$(this).addClass("btn-primary"); | |
$(this).addClass("btn"); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment