Instead of 'border-color' Just try 'border':'1px solid #cccccc', because
border behaves like universal property where we can add color, set width
etc.
The below code works just fine for me.
el.set('styles',{background:'#ebf4fa',border: '2px solid #cccccc'});
this should work perfectly fine with fx
-Clain
On 10/22/2011 1:07 PM, swen wrote:
This is driving me mad , I have a code that works perfect with FX.
Morph in 1.2.x all values also work in 1.1 but the border-color or
border simply do not work and trow NaNpx error.
var fx = new Fx.Styles(element,{ duration:500,wait:false });
element.addEvents({
'mouseenter': function() { fx.start({
'background-color':'#ff8c00',
'border-color':'1px solid #cccccc'
});
I checked and getStyle('border') in moo 1.1 returns 1px solid #fffff
but border-color returns 4x #ffffff for each border I guess , so how
should I declare this properly , each border , border-width , border-
style , I have tried all the above and all of them trow error. Most
cases NaNpx
Here is JSfiddle http://jsfiddle.net/zFq2C/1/
when you switch from 1.1.2 to 1.2.5 change Styles to Morph
As soon as I use the border IE7 does not work at all , background
color works fine . I am sorry but I have to support multiple browsers
and multiple moo versions
If you know better solution which would be simply transition another
div class in and keep same visual effect please please advise. Thank
you!!
PS: toggle class is no go on Moo 1.1.2 so I had to do this