Edit existing inline style using jquery?
I have html which defaults to:
<ul style="top: 72px; visibility: hidden;"> But I need jQuery to save me and change the top: 72px at the top: 37px
Is it possible? as it appears in Firefox 37px, but in IE7 it appears as 72px
thanks
edit: more info added
ul id = treemenu1
and its parent element is div class = treemenu
I would select your ul by id:
$("#treemenu1").css("top", "37px"); Also note that you can update several CSS properties at once by passing an object whose keys and values ββcorrespond to the css properties and their new values:
$("#treemenu1").css({ "top": "37px", "bottom": "20px" });