mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-31 21:20:23 +00:00
use childPages method to abstract method for finding child pages, hopefully we can find something better than the url selector
This commit is contained in:
parent
3035387446
commit
85114be097
1 changed files with 3 additions and 2 deletions
|
|
@ -223,7 +223,8 @@ $.widget( "mobile.listview", $.mobile.widget, {
|
|||
parentListId = parentListId || ++listCountPerPage[ parentId ];
|
||||
|
||||
$( parentList.find( "li>ul, li>ol" ).toArray().reverse() ).each(function( i ) {
|
||||
var list = $( this ),
|
||||
var self = this,
|
||||
list = $( this ),
|
||||
listId = list.attr( "id" ) || parentListId + "-" + i,
|
||||
parent = list.parent(),
|
||||
nodeEls = $( list.prevAll().toArray().reverse() ),
|
||||
|
|
@ -268,7 +269,7 @@ $.widget( "mobile.listview", $.mobile.widget, {
|
|||
if( ui.nextPage ){
|
||||
npURL = nextPage.jqmData( "url" );
|
||||
if( npURL.indexOf( parentUrl + "&" + $.mobile.subPageUrlKey ) !== 0 ){
|
||||
$( ":jqmData(url^='"+ parentUrl + "&" + $.mobile.subPageUrlKey +"')").remove();
|
||||
self.childPages().remove();
|
||||
parentPage.remove();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue