diff --git a/js/jQuery.listview.js b/js/jQuery.listview.js index 507b106f..e0732c3b 100644 --- a/js/jQuery.listview.js +++ b/js/jQuery.listview.js @@ -30,16 +30,17 @@ $.fn.listview = function( options ) { //if it's a nested list, chunk it into ui-page items, recurse through them and call listview on each individual ul $( $this.find( "ul" ).get().reverse() ).each(function( i ) { - var parent = $( this ).parent(), + var list = $( this ), + parent = list.parent(), title = parent.contents()[ 0 ].nodeValue, - theme = $( this ).attr( "[data-theme]" ) !== undefined ? - $( this ).attr( "data-theme" ) : + theme = list.attr( "[data-theme]" ) !== undefined ? + list.attr( "data-theme" ) : o.theme, - countTheme = $( this ).attr( "[data-count-theme]" ) !== undefined ? - $( this ).attr( "data-count-theme" ) : + countTheme = list.attr( "[data-count-theme]" ) !== undefined ? + list.attr( "data-count-theme" ) : o.countTheme; - $( this ).wrap( "