Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Old ticket but I have a solution which I prefer more. It specifically unbinds the resize event through some jQuery internals hacking. I don't like Jasper's solution because it depends on one event firing to block another, and events in theory should never know about each other / you should never depend on the order in which events fire.</p> <pre><code>$(function() { // WARNING: Extremely hacky code ahead. jQuery mobile automatically // sets the current "page" height on page resize. We need to unbind the // resize function ONLY and reset all pages back to auto min-height. // This is specific to jquery 1.8 // First reset all pages to normal $('[data-role="page"]').css('min-height', 'auto'); // Is this the function we want to unbind? var check = function(func) { var f = func.toLocaleString ? func.toLocaleString() : func.toString(); // func.name will catch unminified jquery mobile. otherwise see if // the function body contains two very suspect strings if(func.name === 'resetActivePageHeight' || (f.indexOf('padding-top') &gt; -1 &amp;&amp; f.indexOf('min-height'))) { return true; } }; // First try to unbind the document pageshow event try { // This is a hack in jquery 1.8 to get events bound to a specific node var dHandlers = $._data(document).events.pageshow; for(x = 0; x &lt; dHandlers.length; x++) { if(check(dHandlers[x].handler)) { $(document).unbind('pageshow', dHandlers[x]); break; } } } catch(e) {} // Then try to unbind the window handler try { var wHandlers = $._data(window).events.throttledresize; for(x = 0; x &lt; wHandlers.length; x++) { if(check(wHandlers[x].handler)) { $(window).unbind('throttledresize', wHandlers[x]); break; } } } catch(e) {} }); </code></pre>
 

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