Jump to content

Javascript, Modify An Element's Style...


Anonymouse
 Share

Recommended Posts

I'm trying to change an element's visibility using JavaScript. The code I have now is

var tooltipDiv = document.getElementById("tooltip");

tooltipDiv.style.display = "inline";

BUT IT DOESN'T DO ANYTHING D:

I've tried in firefox and chrome, and used the developer tools in chrome to make a breakpoint and stuff to see if I can debug it... But it seems that <element>.style.display does not exist until I create it. Does anyone know how I would do this?

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.