I have a document in which a background color and image is set through a regular CSS rule.
When a certain event occurs, I want to make that item alive, highlight it (I am using scripchal but this question applies to any framework which is same will do).
new effects Highlight (Allightlight, {Startclosure: '#FFFAG 99', Endlorer: '#ffffff', afterfinish: fnEndOfFadeOut});
The problem I am experiencing is that after the animation is completed, the element is left to the following style (according to firebug):
Element. Style (Background Color: Transparent; Background Image: None;}
Which overrides the CSS rule, because its element is set at the level, so I'm losing the background The item was used ...
Am I trying to do this, in the callback function running after the animation, set the style property to "go away". < / P>
var FnEndOfFadeOut = function () {elHighlight.style.backgroundColor = "XXXxx"; ElHighli Ght.style.backgroundImage = "XXXxx";}
I am trying to figure out how to put "xxxx" (or how to do the same thing in any other way) . I tried 'auto', '' heir '' and '' (empty string), nor did it work (I did not expect them to actually work, but I do not know here).
I also tried: elHighlight.style = "";
What can I do to overcome it?
I know that I am going through that element I can put a span which I am highlighting that highlight and instead exposes that period, hopefully I will be able to avoid extra waste markup.
Thank you!
Chances are that you are not setting the style on the right element. This is probably the line being set anywhere in a parental node.
elHighlight.style.backgroundColor = ""; ElHighlight.style.backgroundImage = "";
You can also remove the default style by calling all :
elHighlight.style.cssText = "";
In any case, you still have to do it on a specific element which is setting these properties, which means that you have to find it until you are recursive on the Piren node You may need to create.
Comments
Post a Comment