first of all: sorry for my english
i have a webpage like this
<div class="item"><div class="details">
<ul>
<li><a href="#">Show div 1</a></li>
<li><a href="#">Show div 2</a></li>
<li><a href="#">Show div 3</a></li>
</ul>
<div>div 1</div>
<div>div 2</div>
<div>div 3</div> </div></div>
IMPORTANT: i have several divs called 'item'.
i have this jquery script
$(document).ready(function() {
$('ul > li > a').each(function(index) {
$(this).click(function() {
$('.details > div:eq(' + index + ')').toggle()
.siblings('.details > div').hide();
});
});
});
BUT if i click on 'a' it shows me the relative 'div' for ALL items. Id like if i click on first 'a' of the first element it shows me the first 'div' of the first ONLY item, not all items.
here's a test page link text (:O it works only with links on first div!)
I hope to have been clear..
Thanks all