My problem is a little complicated.
I have a navigation menu, complete with dropdowns that rely on the slideDown()
animation for functionality. My dropdown has to have a margin-top
due to the way that I style it, but I have to set the margin-top
with jQuery after window load based on the user's font, zoom, etc. settings. To do this, I use attr("style","margin-top: -22px !important")
. This makes my dropdown work exactly as it should. However... when I use slideDown()
, jQuery removes my !important
, which is crucial to the animation of the dropdown. If I don't use !important
, slideDown()
will animate both margin-top
and height
, which does not look good.
My question is: Is there any way to stop jQuery from overriding my inline style?
Example: http://jsfiddle.net/Sy9dC/3/