Kilian / jQuery.pulsate

jQuery.pulsate.js adds a pulsating effect to elements. Useful for drawing the users attention.
http://jquerypulsate.kilianvalkhof.com
MIT License
52 stars 20 forks source link

Pulsate leaves some css on the element #14

Open blackholegalaxy opened 8 years ago

blackholegalaxy commented 8 years ago

Linked to my previous issue report, i managed to style my button to overpass bootstrap css classes.

But, i discovered another thing.

After having finished to run, you script "leaves" some css style attached to the element:

outline: 0px;
box-shadow: rgba(232, 163, 22, 0) 0px 0px 13px;
outline-offset: 20px;

These lines overpass my own design and make my buttons disappear (by removing offset and shadow).

So my question is :Is there any way for pulsate to LEAVE (or put back) the target element at its initial css state?

I don't know if it can "memorize" the css of my element and then put it back after pulsate have done its business.

pa-ra-kram commented 8 years ago

After destroying the pulsate element, you can remove the style as well. $('.myclass').pulsate('destroy'); $('.myclass').removeAttr('style');

This works good, unless you are using inline styles in the element.