Hi
I have 2 divs with the numbers 1-3 in them.
I then use jquery to specify whether the numbers are odd or even...
Trouble is it does not reset the odds/evens when it starts the second div.
Here's the code, hope you know what I mean...
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('p:odd').append('even');
$('p:even').append('odd');
});
</script>
</head>
<body>
<div>
<p>1 </p>
<p>2 </p>
<p>3 </p>
</div>
<div>
<p>1 </p>
<p>2 </p>
<p>3 </p>
</div>
</body>
</html>
Thanks