문제

I'm running around in circles trying to figure out why I can't get jQuery Cycle to work in our Amazon store. jQuery seems to be working fine, as I can run commands from the console, but any time I try to call .cycle(), i get a "*.cycle() is not a function" error. I've used cycle on several other websites with no problems, but this has completely confounded me.

Here's a link to a very basic test page with a Cycle instance that I can't get to work: http://www.st-amz.com/content/Slideshow.htm

Amazon's code is a complete mess, so it could have something to do with stuff on the page being non-compliant, I don't know. ANY help would be appreciated.

도움이 되었습니까?

해결책

Your script tag is pointing to the wrong URL:

http://www.st-amz.com/content/images/jquery.cycle.min.js

But cycle is located off your root:

http://www.st-amz.com/images/jquery.cycle.min.js

So change the script tag to use a root-relative path and it should work as expected:

<script src="/images/jquery.cycle.min.js" type="text/javascript"></script>

다른 팁

The path to your cycle plugin isn't correct, this results in a 404:

<script type="text/javascript" src="images/jquery.cycle.min.js"></script>

Looks like this isn't the right URL:

http://www.st-amz.com/content/images/jquery.cycle.min.js
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top