mt0s mt0s - 3 years ago 85
CSS Question

remove attribute display:none; so the item will be visible

The element is:

span {
position:absolute;
float:left;
height:80px;
width:150px;
top:210px;
left:320px;

background-color:yellow;

display:none; //No display
border: 3px solid #111;
}


I use this code to remove the display so it can be visible,


$("span").removeAttr("display");


but it does not work. Is the method I'm using valid or is there an other way to get the result?

Answer Source

For this particular purpose, $("span").show() should be good enough.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download