Wednesday, December 18, 2013

nth-child selector for ie8 ( jQuery)

1)add jquery latest version in your code

2)add this snippet, replace tr with your required element
<script type="text/javascript">
$( document ).ready(function() {
$('tr:nth-child(odd)').addClass('oddTr');
$('tr:nth-child(even)').addClass('evenTr');
});
</script>
 
3) create class in css 
 
 

No comments:

Post a Comment