Home » » jquery nth child

jquery nth child

Written By 1 on Monday, September 5, 2011 | 6:44 PM


//include jQuery file

<script type="text/javascript" src="jquery.js"></script>

<script>

function go_to(id_number){    

     var obj=jQuery('div.mydiv ul li:nth-child('+id_number+') a');     

     alert(obj.html())

}

go_to(3);

</script>

0 Comment:

Post a Comment