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?
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.
display = "none"; To show an element, set the style display property to “block”. document. getElementById("element").
For this particular purpose, $("span").show()
should be good enough.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With