Skip to content
Advertisement

Adding shine animation not working in special cases

I have this function to shine any text element which is passed to it.

The first example here works fine (the second example doesn’t work, I provide this in case this can help us find out the issue):

JavaScript
JavaScript
JavaScript

I expect this function work in any satiation but unfortunately we have this second example in which the function acts wired and doesn’t work as expected, here it is:

Note: the shine function is identical in both cases. the only difference is the element I pass to the function.

Here we want to shine the expandCaptionSpan id:

JavaScript
JavaScript
JavaScript

How can I fix the second example? What am I missing?

Advertisement

Answer

It seems that your JS is the same but CSS not. I’ve found that text-shadow is causing the issue. Just replace it with filter as it’s done in your first example and it works. It seems that the issue is caused by render system.

JavaScript
JavaScript
JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement