Pregunta

i want to understand if the display: none in html means that the element doesn't exist in the browser perspective ? i have the following situation : i have a element that i use to repear a plugin

<embed width="100%" height="100%" id="embedElement"
        TYPE="Application/DynamicWebTwain-Plugin"
        PLUGINSPAGE="/gestionRH/webTwain/DynamicWebTwain.xpi"> 
</embed>

the code javascript :

var Plugin = document.embeds[0];

when i put the embed element within a div and set display css attribute of this div into none javascript seems not to find this element what is the explanation ?

¿Fue útil?

Solución

You can use another technique to hide the element and still access it:

.hide {
   position: absolute !important;
   top: -9999px !important;
   left: -9999px !important;
}

http://css-tricks.com/places-its-tempting-to-use-display-none-but-dont/

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top