This is my HTML:
<ol id="front-page">
<li>
<img src="images/defaultImage.gif" alt="Default Image" />
<a href="#" title="Title Entry">Title Entry</a> </li>
<li>
<img src="images/defaultImage.gif" alt="Default Image" />
<a href="#" title="Title Entry">Title Entry</a>
</li>
<li>
<img src="images/defaultImage.gif" alt="Default Image" />
<a href="#" title="Title Entry">Title Entry</a>
</li>
<li>
<img src="images/defaultImage.gif" alt="Default Image" />
<a href="#" title="Title Entry">Title Entry</a>
</li>
<li>
<img src="images/defaultImage.gif" alt="Default Image" />
<a href="#" title="Title Entry">Title Entry</a>
</li>
<li>
<img src="images/defaultImage.gif" alt="Default Image" />
<a href="#" title="Title Entry">Title Entry</a>
</li>
<li>
<img src="images/defaultImage.gif" alt="Default Image" />
<a href="#" title="Title Entry">Title Entry</a>
</li>
<li>
<img src="images/defaultImage.gif" alt="Default Image" />
<a href="#" title="Title Entry">Title Entry</a>
</li>
and my jQuery:
$(document).ready(function() {
$('ol#front-page').find('li:eq(4)').css("margin","0");
$('ol#front-page').find('li:lt(4)').append("<span>New</span>");
});
and what I am trying to do is have the first 3 list items to have a span appended to them. It will append the span to the 0 element but not the other 3?
Thanks for the help!