Friday, March 25, 2011

Adjust div height according to image in it dynamically on image swap

<img class="orbt" onmouseover="MM_swapImage('full','','http://demo/demo.jpg',1);MM_setTextOfLayer('text','','&lt;div class=&quot;dress-text&quot;&gt;&lt;strong&gt;Malyse&lt;br /&gt;&lt;/strong&gt;&lt;p&gt;&lt;/em&gt;&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;');var theImg = document.getElementById('full');var thediv = document.getElementById('container1');thediv.style.pixelHeight=parseInt(theImg.height)+200;" src="http://demo/demo.png" alt="Malyse" width="81" height="81" />

No comments:

Post a Comment