Reputation: 955
i created a maze and i want to set an event(or what it takes) that when user mouse leave (after he failed) it will clear the colored way for he can start over again
$(".way").bind('mouseenter', function() {
$('#highlight_lose').fadeIn(400);
})
here is the fiddle link:
Upvotes: 3
Views: 50
Reputation: 102
Add $(".wall").css("background",'#fff');
to #highlight_lose
and #finish
$('#highlight_lose').bind('mouseleave', function() {
$(this).fadeOut(400);
$(".wall").css("background",'#fff');
})
$('#finish').bind('mouseenter', function() {
$('#highlight_win').fadeIn(400);
$(".wall").css("background",'#fff');
})
Upvotes: 1