Note that there are some explanatory texts on larger screens.

plurals
  1. POGet highslide size dynamically on window resize
    primarykey
    data
    text
    <p>Is that possible to see the size dynamically when i resize Highslide box (by dragging right-bottom corner)?</p> <p><strong>Here is how to determine size of Highslide box:</strong> <a href="http://jsfiddle.net/roadrash/yUuRX/" rel="nofollow">http://jsfiddle.net/roadrash/yUuRX/</a></p> <p>HTML:</p> <pre><code> &lt;div&gt; &lt;a href="javascript:;" onclick="return hs.htmlExpand(this)" title="test"&gt; Open HTML-content &lt;/a&gt; &lt;div class="highslide-maincontent"&gt; &lt;h3&gt;Lorem ipsum&lt;/h3&gt; &lt;p&gt; Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam dapibus leo quis nisl. In lectus. Vivamus consectetuer pede in nisl. Mauris cursus pretium mauris. Suspendisse condimentum mi ac tellus. &lt;/p&gt; &lt;p style="color: red;"&gt; Popup width: [width]px&lt;br /&gt; Popup height: [height]px &lt;/p&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>JavaScript:</p> <pre><code>hs.graphicsDir = 'http://highslide.com/highslide/graphics/'; hs.outlineType = 'rounded-white'; hs.wrapperClassName = 'draggable-header'; hs.Expander.prototype.onBeforeExpand = function(sender) { var popupWidth = sender.x.full; var popupHeight = sender.y.full; sender.content.innerHTML = sender.content.innerHTML.replace('[width]', popupWidth).replace('[height]', popupHeight); }; </code></pre> <p><strong>Here is what i want inside HighSlide on resize:</strong> <a href="http://jsfiddle.net/Uvh6e/226/" rel="nofollow">http://jsfiddle.net/Uvh6e/226/</a></p> <p>HTML:</p> <pre><code>&lt;div id="zzz"&gt;dfjhgkdfjhgkjdfgkjdfgkjhdfjkgjkjdfhgkjdhf&lt;br&gt;fgfg&lt;/div&gt; &lt;span id="jsWidth"&gt;0&lt;/span&gt;, &lt;span id="jsHeight"&gt;0&lt;/span&gt; </code></pre> <p>JavaScript:</p> <pre><code>function jsUpdateSize(){ var width = document.getElementById('zzz').offsetWidth; var height = document.getElementById('zzz').offsetHeight; document.getElementById('jsWidth').innerHTML = width; document.getElementById('jsHeight').innerHTML = height; }; window.onload = jsUpdateSize; window.onresize = jsUpdateSize; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload