Hello,
Basically I have a hyperlink with an onMouseOver event to show a hidden DIV. Everything works perfect...until I display it in a Shadowbox.
Head JavaScript
HTMLCode:function toggleDiv(id,flagit) { if (flagit=="1"){ if (document.layers) document.layers[''+id+''].display = "block" else if (document.all) document.all[''+id+''].style.display = "block" else if (document.getElementById) document.getElementById(''+id+'').style.display = "block" } else if (flagit=="0"){ if (document.layers) document.layers[''+id+''].display = "none" else if (document.all) document.all[''+id+''].style.display = "none" else if (document.getElementById) document.getElementById(''+id+'').style.display = "none" } }
Like I said, everything works perfectly until I call the containing DIV (container) in a Shadowbox. I notice that if I have two instances of the hidden DIVs, one on the page and one in the Shadowbox, while triggering the onMouseOver events in the Shadowbox, the DIVs of the on-page DIVs will hide/show appropriately.Code:<div id="container"> <div id="div1" style="display:none;" class="my_class">Stuff contained in the DIV that I want to show.</div> <div class="tack_it_option"><a onMouseOver="toggleDiv('div1',1)" onMouseOut="toggleDiv('div1',0)" href="#">Show DIV</a></div> </div>


Reply With Quote

Bookmarks