简体   繁体   English

Mootools Fx.Slide:未定义不是函数

[英]Mootools Fx.Slide: undefined is not a function

I want to make one div to slideOut, but I get an error.. 我想将一个div插入slideOut,但是出现错误。

Code

<script src="http://ajax.googleapis.com/ajax/libs/mootools/1.4.5/mootools-yui-compressed.js"></script>

window.addEvent('domready', function() {

  var div = new Fx.Slide('divID');
  div.slideOut();
});

The error is just below var div 错误正好在var div以下

Uncaught TypeError: undefined is not a function 

Unfortunately the Fx.Slide helper is not part of Mootools Core, it is part of the More package. 不幸的是, Fx.Slide帮助器不是Mootools Core的一部分,而是More软件包的一部分。 The CDN file you are loading is only the Core. 您正在加载的CDN文件仅是Core。 You will need to find another CDN that hosts More, or serve it from your own server. 您将需要找到另一个承载更多CDN的CDN,或者从您自己的服务器提供它。

It looks like Google doesn't host More at the moment: http://code.google.com/p/google-ajax-apis/issues/detail?id=135 看来Google目前没有托管更多服务: http : //code.google.com/p/google-ajax-apis/issues/detail?id=135

For more info, as it says right at the top of the main download page: http://mootools.net/download 有关更多信息,请参见主下载页面顶部的链接: http : //mootools.net/download

From this page you can download the full MooTools Core. If you need more
functionality, head over to the More Builder.

So go here: http://mootools.net/more/ and check off any More features you want. 所以去这里: http://mootools.net/more/和检查过任何More你想要的功能。 Check off Fx.Slide and click download at the bottom of the page. 选中Fx.Slide ,然后点击页面底部的下载。

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

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