简体   繁体   中英

Mootools Fx.Slide: undefined is not a function

I want to make one div to slideOut, but I get an error..

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

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. The CDN file you are loading is only the Core. You will need to find another CDN that hosts More, or serve it from your own server.

It looks like Google doesn't host More at the moment: 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

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. Check off Fx.Slide and click download at the bottom of the page.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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