Вопрос

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:

http://jsfiddle.net/uqcLn/8/

Это было полезно?

Решение

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'); 
})

http://jsfiddle.net/uqcLn/22/

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top