Fixes “infinite scroll” demo by triggering “refresh” on listviews specifically. Should there be a universal “refresh” event? Let us think on this, and discuss.

This commit is contained in:
Mat Marquis 2011-12-19 19:05:33 -05:00
parent e880886ad6
commit bea048062d

View file

@ -60,20 +60,13 @@ $.widget( "mobile.fetchlink", $.mobile.widget, {
normalizePath( 'img', 'src' );
normalizePath( 'a', 'href');
setTimeout(function() {
responseEl
.trigger( "fetchlink", { target : targetEl, data: responseEl })
.trigger('create' );
setTimeout(function() {
targetEl[ method ]( responseEl.addClass('fade in') );
$(":jqmData(role='page')").trigger( "create" );
targetEl
.listview( "refresh" ) // This should work with trigger( "refresh" ).
.removeClass('ui-loading-inline')
.height('auto');
}, 300);
});
}