Sunday, 21 May 2017

javascript - How to remove style property






Possible Duplicate:
jQuery - remove style added with .css() function






I want to remove the style property from the div , i cannot use the removeAttribute and removeProperty as removeAttribute removes whole style and remove Property doesnot works in ie.

Is there any other way to do it.






I want to remove only visibility style property.


Answer



Use the .css as such



$(elementSelect).css('marginRight', null);



or



$(elementSelect).css('marginRight', '0px').css('visibility', 'visible');

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...