First, you can use
el.setStyle('border','');//empty string

second, you can always use the !important to set precedence

On Mon, Sep 27, 2010 at 4:22 PM, stratboy <[email protected]> wrote:

> Hi. I've always had this problem: for example, if I set an button's
> hover state by changing its styles via setStyles, then the natural
> css :hover declarations will not work anymore. That's because styles
> get written in the tag's inline style property, which takes precedence
> over the others. Ok. One solution I've found is to erase it. Simply
> something like this:
>
> $('elem').erase('style');
>
> This way I re-enable the natural css :hover effects. But there's a
> problem: what if that tag already contained other inline styles not
> related with the hover effects? I think don't want to erase them too,
> right?
>
> So, finally, my real question: is there any better or more elegant
> method to accomplish this task?
>
> Thank you :)




-- 
Arieh Glazer
אריה גלזר
052-5348-561
5561

Reply via email to