How can i change this function:
$('#myContent').live('mouseover mouseout', function(event){
if ( event.type == "mouseover" ) {
$('#editContent').show();
} else {
$('#editContent').hide();
}
});
if i want $('#editContent') to be show on mouseover on $('#myContent'), but then it should be hiden only if $('#myContent') has event mouseover and $('#editContent') has mouseover?
One question, do you have to use the event “live”? Since I don’t know how your HTML is implemented, I can just assume things.
Live demo
Above is an example how you can achieve this. As I assume you do not append “editContent” and “myContent” dynamically, I use event “hover” instead.
Hope that helps!