I have created a jQuery widget for other people to embed on their website, and within the widget I am using a css reset stylesheet called "cleanslate" from here:
https://github.com/premasagar/cleanslate
This stops the page style creeping into my widget.
Problem is that my fadeOut and fadeIn's are no longer working because the reset style is overriding the display
inline style jQuery is adding. I need to make the fadeOut function add !important;
to the inline style.
Does anyone know if this is possible?
Thanks in advance.
I came up with the solution below, hope it helps someone else in the same situation.
All comments / improvements welcome:
jQuery("element").fadeOut("slow", function() {
jQuery("element").attr("style", "display: none !important");
});
Thanks
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With