Created
August 14, 2013 11:55
-
-
Save anandkumar/6230385 to your computer and use it in GitHub Desktop.
Color table using javascript.
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
<script type="text/javascript">jQuery(document).ready(function ($) { | |
$('table').css({ | |
'border-collapse':'collapse' | |
}); | |
$('tr th').css({'background':'#666666', 'color':'#ffffff', 'font-family':'verdana', 'font-weight':'normal'}); | |
// Here using jquery selectors | |
$('tr:even').css({'background':'#f5f5f5'}); | |
$('tr:odd').css({'background':'#e3e3e3'}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment