fufu
fufu

Reputation: 53

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 

Upvotes: 0

Views: 1781

Answers (1)

loganfsmyth
loganfsmyth

Reputation: 161517

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.

Upvotes: 1

Related Questions