Hi guys, im new to using mootools and I'm trying to setup a fade
effect while content is loaded into a div, the code i have is below.
function loadElement(element,uri) {
var makeRequest = function() {
var req = new Request.HTML({
url:uri,
onSuccess: function(html) {
gebi(element).adopt(html);
fadeIn.start(0,1);
},
onFailure: function() {
gebi(element).set('text', 'The request
failed.');
}
});
req.send();
};
var fadeIn = new Fx.Tween(element,'opacity',{ duration: 1000 });
var fadeOut = new Fx.Tween(element,'opacity',{ duration: 1000,
onComplete: makeRequest });
fadeOut.start(1,0);
};
"gebi" is a utility function of mine, it's simply a wrapper for
getElementById (hence gebi) since i got sick of writing
document.getElementById over and over and over :p
When i try and use the code it dies on fadeOut.start(1,0) with
"G.camelCase is not a function" on line 192, im using 1.2.1 on firefox
2.0.0.13.
Am I doing something obvious and stupid here ?