Specifically I want to remove the "filter: ;" from the element once it
has been faded in so as to get around the cleartype problem with IE.
We have setStyle() now I just need removeStyle() ;)
Chris
Thanks, but that doesn't actually remove it. The style is still there
just with no value (" filter: ;").
To resolve the IE issue it needs to be completly removed (at least iit
does as far as I have been able to test things)
Chris
Sent from my iPhone
When I try to remove it using setStyle('filter',''); it still leaves
the "filter: ;" in there :(
Here is a mooshell demo:
http://mootools.net/shell/hSd5C/
This does nothing in Firefox as I am only concentrating on the IE
"filter" style.
If you check the html in the IE developers tools, you will see that
the filter style does not get removed :(
Chris
<div id="test" style="background-color:#333333;color:#456789">This is my
tag</div>
Element.implement(
{
removeStyle: function(ele)
{
regex = new RegExp(ele+ '.*?;');
style = this.get('style')+';';
this.set('style', style.replace(regex, ''));
}
});
$('test').removeStyle("background-color");
http://mootools.net/shell/BYNeE/
My regex skills are lacking but this should do the trick.
Maybe someone can fix my regex pattern to make it match better.
Chris
__________ Information from ESET Smart Security, version of virus signature
database 4872 (20100216) __________
The message was checked by ESET Smart Security.
__________ Information from ESET Smart Security, version of virus signature
database 4872 (20100216) __________
The message was checked by ESET Smart Security.
http://mootools.net/shell/QPyND/
-----Original Message-----
From: mootool...@googlegroups.com
[mailto:mootool...@googlegroups.com] On Behalf Of cbolson
Sent: Tuesday, February 16, 2010 7:52 PM
To: MooTools Users
Subject: [Moo] Re: remove inline css style "filter"
Chris
Surely you do not see this function removing style.color in IE, n'eh?
You have to do a case-insensitive search.
-- Sandy
http://mootools.net/shell/QPyND/1/
or just change
regex = new RegExp('[~;\\s]' + ele + '.*?[;~]', "i");
-- Sandy
Chris