I've googled and so searched this, but to no avail (probably poor search skills).
My problem is probably pretty simple, I simply want the mouseover event to only show the containing div (.action) when the list item is moused over (ui-state-default).
Here's the Markup
<ul id="column-2" class="connectedSortable">
<li class="ui-state-default">feature
<div class="action">
<img src="delete.png" class="delete" alt="Delete this Story">
<br />
<img src="duplicate.png" class="delete" alt="Duplicate this Story">
</div>
</li>
<li class="ui-state-default">forward
<div class="action">
<img src="delete.png" class="delete" alt="Delete this Story">
<br />
<img src="duplicate.png" class="delete" alt="Duplicate this Story">
</div>
</li>
</ul>
And the JavaScript
$(function() {
$(".ui-state-default").mouseenter(function(){
$(".action").show();
}).mouseleave(function(){
$(".action").hide();
});
});
Now I realise that this is going to show every occurrence of .action - but how can I make sure it only shows it within it's parent li? I've tried using the jquery parent/child arguements but have failed miserably.
Any help would be much appreciated.