Created
August 28, 2008 09:26
-
-
Save jcoglan/7689 to your computer and use it in GitHub Desktop.
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
// Causes Ojay.HTML to add type-matching class names | |
// to all generated input tags | |
Ojay.HtmlBuilder.include({ | |
input: Ojay.HTML.input.wrap(function() { | |
var args = Array.from(arguments), | |
input = args.shift().apply(null, args); | |
Ojay(input).addClass(input.type); | |
return input; | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment