Skip to content

Instantly share code, notes, and snippets.

@timelf123
Created September 26, 2013 18:19
Show Gist options
  • Save timelf123/6718329 to your computer and use it in GitHub Desktop.
Save timelf123/6718329 to your computer and use it in GitHub Desktop.
all inputs, selects and textareas within .uniform have uniform() run on them
$('.uniform input:checkbox[class]').each(function() {
var checkboxClasses = $(this).attr('class');
$(this).parent().parent('div.checker').addClass(checkboxClasses);
});
$('.uniform input:radio[class]').each(function() {
var radioClasses = $(this).attr('class');
$(this).parent().parent('div.radio').addClass(radioClasses);
});
$('.uniform select[class]').each(function() {
var selectClasses = $(this).attr('class');
$(this).parent('div.selector').addClass(selectClasses);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment