Hi everyone,
I have a navigation menu in xHTML with the following typical structure:
<ul id="nav1">
<li><a href="#">item1</a></li>
</ul>
I have this jQuery script to add a space and a slash after every link:
$('#nav1 li,#nav2 li').append(' /');
However, after the last link (aka the last li), I want to only add a space (aka  ). I tried doing this, but it didn't get the job done:
$('#nav1 li,#nav2 li').append(' /').filter('#nav1 li:last,#nav2 li:last').append(' ');
Any ideas?
Thanks! Amit