Skip to content

Commit bea0480

Browse files
committed
Fixes “infinite scroll” demo by triggering “refresh” on listviews specifically. Should there be a universal “refresh” event? Let us think on this, and discuss.
1 parent e880886 commit bea0480

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

js/jquery.mobile.fetchlinks.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,20 +60,13 @@ $.widget( "mobile.fetchlink", $.mobile.widget, {
6060
normalizePath( 'img', 'src' );
6161
normalizePath( 'a', 'href');
6262

63-
setTimeout(function() {
64-
responseEl
65-
.trigger( "fetchlink", { target : targetEl, data: responseEl })
66-
.trigger('create' );
67-
63+
setTimeout(function() {
6864
targetEl[ method ]( responseEl.addClass('fade in') );
69-
70-
$(":jqmData(role='page')").trigger( "create" );
7165

72-
7366
targetEl
67+
.listview( "refresh" ) // This should work with trigger( "refresh" ).
7468
.removeClass('ui-loading-inline')
7569
.height('auto');
76-
7770
}, 300);
7871
});
7972
}

0 commit comments

Comments
 (0)