From a87025eb8a9129e73db66f2a514c7a5d4449cb1c Mon Sep 17 00:00:00 2001 From: n0v1 Date: Fri, 7 Nov 2014 09:22:48 +0100 Subject: [PATCH] correctly detected nested list if text was clicked instead of li element. Otherwise an empty list will be shown. --- jquery.mobile.nestedlists.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery.mobile.nestedlists.js b/jquery.mobile.nestedlists.js index 3d93d04..2778b63 100644 --- a/jquery.mobile.nestedlists.js +++ b/jquery.mobile.nestedlists.js @@ -41,7 +41,7 @@ } this.opening = true; this.newPage = $( this.options.page ).uniqueId(); - this.nestedList = $( event.target ).children( "ul" ) + this.nestedList = $( event.target ).closest( "li" ).children( "ul" ) .clone().attr( "data-" + $.mobile.ns + "role", "listview" ) .css( "display", "block" ); this.pageName = (