简体   繁体   English

jQuery代码可在jsFiddle中使用,但不能在我的网站上使用

[英]jQuery code works in jsFiddle but not on my site

I know it's usually an encoding error, and in fact the Google Chrome developer debugger gives me the error: 我知道这通常是编码错误,实际上Google Chrome开发人员调试器会给我以下错误:

Uncaught SyntaxError: Unexpected token ILLEGAL Uncaught SyntaxError:意外的令牌非法

But I can't see where this error is occurring. 但是我看不到发生此错误的位置。 What am I doing wrong here? 我在这里做错了什么?

Fiddle: http://jsfiddle.net/6fwbS/19/ 小提琴: http : //jsfiddle.net/6fwbS/19/

//User defined variables
var adjacents = 3

//Script variables
var a = 0,
    b, c;
var imgArr = [];

My site: http://digitalbrent.com/lab/ 我的网站: http : //digitalbrent.com/lab/

(I've checked the other questions with similar titles but I can't seem to find the problem in my code.) (我已经检查了其他标题相似的问题,但似乎无法在代码中找到问题。)

On your site, there are some junk characters in the code right before the </script> : 在您的网站上, </script>之前的代码中有一些垃圾字符:

        $('.right_slot').animate({
            opacity: 0,
            left: '+=50px'
        }, 300);
    }​
</script> 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM