1

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.

<div style="visiblity:hidden;margin-right:10px;margin-left:10px">

I want to remove only visibility style property.

Community
  • 1
  • 1
Kunal Vashist
  • 2,380
  • 6
  • 30
  • 59

5 Answers5

0

Use the .css as such

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

or

$(elementSelect).css('marginRight', '0px').css('visibility', 'visible');
Gareth Parker
  • 5,012
  • 2
  • 18
  • 42
0

You can use css function of jQuery

$('div').css({'visibility':'visible'});
BenMorel
  • 34,448
  • 50
  • 182
  • 322
muck41
  • 288
  • 2
  • 9
0

you can try this one :

$('div').css('visibility', '')
chickens
  • 19,976
  • 6
  • 58
  • 55
Ankur Ghelani
  • 659
  • 4
  • 16
0

Do you mean:

<div id="testDiv" style="visiblity:hidden;margin-right:10px;margin-left:10px">Here</div>

$('#testDiv').attr('style', function(i, style) {
    return style.replace(/visiblity[^;]+;?/g, '');
});

Example: jsFiddle

Sudhir Bastakoti
  • 99,167
  • 15
  • 158
  • 162
-3

Add runat="server" and then you could override the Visibility parameter from the code-behind

Tim Cadieux
  • 447
  • 9
  • 21