From b04651e1cebcfd68d3ae72cc5c7457f9324a9d27 Mon Sep 17 00:00:00 2001 From: "J.T. Sage" Date: Wed, 13 Jun 2012 18:30:33 -0400 Subject: [PATCH] Add logic to work with less-structured, but still valid jqm pages (i.e. no data-role="content" div present) --- js/jquery.mobile.simpledialog2.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/jquery.mobile.simpledialog2.js b/js/jquery.mobile.simpledialog2.js index 743a93f..7b3c77d 100644 --- a/js/jquery.mobile.simpledialog2.js +++ b/js/jquery.mobile.simpledialog2.js @@ -75,6 +75,7 @@ if ( typeof $.mobile.sdLastInput !== 'undefined' ) { delete $.mobile.sdLastInput; } self.internalID = initDate.getTime(); self.displayAnchor = $.mobile.activePage.children('.ui-content').first(); + if ( self.displayAnchor.length === 0 ) { self.displayAnchor = $.mobile.activePage; } self.dialogPage = $("
"); self.sdAllContent = self.dialogPage.find('[data-role=content]');