Created
February 15, 2012 08:03
-
-
Save rutger1140/1834308 to your computer and use it in GitHub Desktop.
Add CSS helper classes in jQuery
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
/** | |
* CSS Helpers | |
* @description: Used for decorating input types, first and last childs | |
*/ | |
$('input[type=checkbox]').addClass('checkbox'); | |
$('input[type=radio]').addClass('radio'); | |
$('input[type=file]').addClass('file'); | |
$('[disabled=disabled]').addClass('disabled'); | |
$('table').find('tr:even').addClass('even'); | |
$('table').find('tr:first-child').addClass('first'); | |
$('table').find('tr:last-child').addClass('last'); | |
$('ul').find('li:first-child').addClass('first'); | |
$('ul').find('li:last-child').addClass('last'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment