Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 411
mt0s Avatar asked Sep 06 '10 20:09

mt0s


People also ask

How do I remove attributes?

The removeAttribute() method removes an attribute, and does not have a return value. The removeAttributeNode() method removes an Attr object, and returns the removed object.

How do you display elements in display none?

display = "none"; To show an element, set the style display property to “block”. document. getElementById("element").


1 Answers

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

like image 57
Nikita Rybak Avatar answered Sep 25 '22 21:09

Nikita Rybak