SB with Mootools fx.styles

Hello Steffen,

Me again...

I try to apply mootools effect on a .sbinner class to get a coloured transition with mousehover.

Doesn't work obviously...

The script work well with all other div of my page exept ones with SB.

Here is the script :

-----------------------------------------------------------------------
var list = $$('.sb-inner');
list.each(function(element) {

var fx = new Fx.Styles(element, {duration:200, wait:false});

fx.start({
'background-color': '#1A3144'
});

element.addEvent('mouseenter', function(){
fx.start({
'background-color': '#4692CE'
});
});

element.addEvent('mouseleave', function(){
fx.start({
'background-color': '#1A3144'
});
});

});

-----------------------------------------------------------------------

Is the thing is possible yet ?

Thanks

Ben

Trackback URL for this post:

http://www.ruzee.com/trackback/175

Unfortunatly not ...

Since the ShadedBorder colors are applied to loads of DIVs via CSS classes, the moo animation cannot work efficiently. It would have to change every single generated DIV.

I see...

A bit complicated indeed.
Thanks for answer.

Mootools events and effects ona ruzee shaded border div

First that code is really long handed, let's shorten it up and get you rolling.

Target the sb-inner class of a give ruzee target ID like this:

$$('#myDivId .sb-inner').set({'events':
{
'mouseenter': function(){},
'mouseleave': function(){}
}
});

Hope that helps you.

oh and...

You can do selectors like this in mootools for morph:

var ruzeeMorph = new Fx.Morph('#myDivId .sb-inner', {});

Your fist one wasn't wrong, neither were you Steffen, you just weren't selecting the ruzee instances sb-inner class most likely. try that guys.