javascript - Jquery not working while browsing with Firefox -
hello i'm using code:
$("#cart").click(function () { if ($(event.target).closest('.content').length > 0) return false; $('#cart').load('index.php?route=module/cart #cart > *'); var e = window.event || e; $("#cart").toggleclass("active"); e.stoppropagation(); $(document).click(function (e) { $("#cart").removeclass("active"); $('#cart').live('mouseleave', function () { // code here }); }); });
it works fine in chrome when testing in firefox doesn't work. line doesn't work is:
if ($(event.target).closest('.content').length>0) return false;
why work in chrome not in firefox ?
you didn't pass event argument
try
$("#cart").click(function(event) { // put code here }
Comments
Post a Comment