开发者

jQuery scrollTo minified

开发者 https://www.devze.com 2022-12-31 15:37 出处:网络
I downloaded the latest jquery.scrollTo from the plugins site. Is there an obvious reason why开发者_开发技巧 the minified version does not work? With the exact same code the console throws the error:

I downloaded the latest jquery.scrollTo from the plugins site. Is there an obvious reason why开发者_开发技巧 the minified version does not work? With the exact same code the console throws the error:

$.scrollTo is not a function

For info this is my only statement:

$.scrollTo('-=600px', 400, { axis:'y' });


The minified version does work, make sure you're including it correctly, e.g. that your server relative location, permission, etc works...try accessing it directly in your browser.

You can see a working demo here using: http://demos.flesler.com/jquery/scrollTo/js/jquery.scrollTo-min.js (don't hotlink, this is just a demo showing the minified version works)


Check for the closing ; after each statement. It is optional but the minifization makes it required.

0

精彩评论

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