JavaScript error (Uncaught SyntaxError: Unexpected end of input)

后端 未结 11 2087
天命终不由人
天命终不由人 2020-11-27 10:30

I have some JavaScript code that works in FireFox but not in Chrome or IE.

In the Chrome JS Console I get the follow error:

\"Uncaught Synta

11条回答
  •  渐次进展
    2020-11-27 10:58

    Formatting your code a bit, you have only closed the inner hover function. You have not closed the outer parts, marked below:

    $(// missing closing)
     function() { // missing closing }
         $("#mewlyDiagnosed").hover(
            function() {
                $("#mewlyDiagnosed").animate({'height': '237px', 'top': "-75px"});
            }, 
            function() {
                $("#mewlyDiagnosed").animate({'height': '162px', 'top': "0px"});
            });
    

提交回复
热议问题