Posts Tagged 'ajax'

Marquee with Mootools 1.2 (Mooquee)

Time is changing… So here is my first post not about Ubuntu.

As Alberto pointed out: There is a new Version of Mooquee which works with Mootools 1.2, so you can save the time to follow this tutorial 😉 Thank you Alberto!

For my webdesign I needed something like the deprecated marquee-Element. Because I have the mootools-library (Version 1.2) already included I searched for something based on mootools.

I found a pretty nice snippet called Mooquee by Dirar Abu Kteish which worked fine in the demo. I tried to integrate it into my page but the scroll-effect did not work.

Window.onDomReady is not a function

Window.onDomReady is not a function

In the error console (Firefox) I got the following error: window.onDomReady is not a function.

After searching for mootools window.ondomready is not a function I found a Mootools Forum and learned that “Window.onDomReady is deprecated in 1.1dev” so it has to be deprecated in 1.2 too.

So we need to call window.addEvent('domready', function() { //Your code here }); instead. The code to call the funtion is now:
<script type="text/javascript">
var obj;
function startMoorquee() {
obj = new mooquee($('mooquee1'));
//cancel on mouse over
//obj = new mooquee($('mooquee1'), {pauseOnOver: false});
window.addEvent('domready', function() {startMoorquee()});

setHTML is not a function

setHTML is not a function

After retrying my page I received the follwing error: (new Element(“div”, {class: “mooquee-text”, id: “mooquee-text”})).setHTML is not a function.

So I replaced the following in the file mooquee.js (line 30):



set('html', el.innerHTML);
el.set('html', '');

And now it works, mooquee is now compatible to mootools 1.2.

You can download the modified files (Demo with [modified] mooquee and mootools 1.2) here.