Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to reload Iscroll after jqm datafilter change?
    primarykey
    data
    text
    <p>I have a listview with a jquerymobile datafilter and I'm using iscroll. After a search with the datafilter I would like to reload Iscroll since it doesn't resize the scrollable area.(So it's possible to scroll away from the items)</p> <p>This is my html:</p> <pre><code> &lt;div id="mywrapper" class="wrapper"&gt; &lt;div data-role="content" id="myscroller"&gt; &lt;ul data-role="listview" id="lstvw_myitems" data-filter="true"&gt;&lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>I have already tried to bind a change event to the listvw_myitems change but it doesn't seem to get called. </p> <p>This is what I've tried:</p> <pre><code>$('#lstvw_myitems').change(function() { loadIScroll('wrapper'); }); </code></pre> <p>Are there any other (jquery)events I could try to catch on the listview? </p> <p>This is the Iscroll code I use.(the timeout is to fix a bug when iscroll was loading,the other code is to prevent selecting while scrolling.)</p> <pre><code>function loadIScroll(wrapperId){ setTimeout(function () { var myScroll = new iScroll(wrapperId, {bounce: false, hScrollbar: false, vScrollbar: false, vScroll: true, useTransform: true, zoom: false, onBeforeScrollStart: function(e){ var target = e.target; while (target.nodeType != 1) target = target.parentNode; if (target.tagName != 'SELECT' &amp;&amp; target.tagName != 'INPUT' &amp;&amp; target.tagName != 'TEXTAREA') e.preventDefault(); } }); }, 1); </code></pre> <p>}</p> <p>I'm using jqm 1.3 jq 1.9.1 and iscroll v4.2.5.</p>
    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