开发者

What's wrong with my JQuery syntax here?

This code is throwing me a syntax error:

$("body").live("click", (function(){ 
        i开发者_如何学Pythonf ((! mouse_is_inside) && ($("div#notification_box").is(":visible"))) {
           $("div#notification_box").hide();
           $("p.exclamation").removeClass("exclamation_hover");
           $.ajax("/videos/update_box.js");
      }     
    });


Remove the ( before function. You have mismatched parentheses.


You have an extra ( right before function(){

Here is the proper code:

$("body").live("click", function(){ 
    if ((! mouse_is_inside) && ($("div#notification_box").is(":visible"))) {
       $("div#notification_box").hide();
       $("p.exclamation").removeClass("exclamation_hover");
       $.ajax("/videos/update_box.js");
  }     
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜