-1

i creat a maze and don't know why on hover not working will be happy for any help

$('.wall')
.bind('mouseenter', function() {
    $(this).css({
        'background-color': 'green'
    });
})

here is the fiddle link:

http://jsfiddle.net/uqcLn/6/

alonblack
  • 905
  • 2
  • 12
  • 31

1 Answers1

2

use this in jsfiddle:

in html add this:

<script type="text/javascript" src="http://codeorigin.jquery.com/jquery-1.10.2.min.js"></script>

and in script do this:

$(document).ready(function(){
    $(document).on("mouseenter",".wall",function(){
     $(this).css({
            'background-color': 'green'
        });
    });
    $(document).on('mouseleave',".wall", function () {
        $(this).css({
           'background-color': ''
        });
    });
});
Hugo Tostes
  • 412
  • 4
  • 13