4

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.

superphonic
  • 7,954
  • 6
  • 30
  • 63

1 Answers1

7

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

superphonic
  • 7,954
  • 6
  • 30
  • 63