Okay, so I'm trying to achieve something like you have in the back end of Wordpress where when you hover over a row in the the table of posts, it displays the edit, trash and preview links.
However, when I try this, it appends the links twice which is a bit of a problem. I read that the hover fires functions off twice on hover in chrome, but tried it in opera and the same error occurred so I don't think that's the problem.
Here is a demo of it
And here is the code
// Table row hover displays links
$('table.tablesorter tbody tr').hover(
function() { // mouseover
$(this).children('td:nth-child(2)').append('<p class="links"><a>Edit</a><a>Preview</a><a>Delete</a></p>');
},
function() { // mouseout
$(this).children('td:nth-child(2)').find('p.links').remove();
}
);
Can you see why it adds the links twice instead of once?