From b15b9153a493278109040f05a2f09bcc7f133803 Mon Sep 17 00:00:00 2001 From: scottjehl Date: Wed, 20 Oct 2010 18:32:00 -0400 Subject: [PATCH] changed ajax response injection to avoid filtering-out script elements that are included in the page div. Fixes #145 --- js/jquery.mobile.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/jquery.mobile.js b/js/jquery.mobile.js index 9f081336..5a23073a 100644 --- a/js/jquery.mobile.js +++ b/js/jquery.mobile.js @@ -275,7 +275,10 @@ $.ajax({ url: fileUrl, success: function( html ) { - var page = jQuery("
" + html + "
").find('[data-role="page"]'); + var all = jQuery("
"); + //workaround to allow scripts to execute when included in page divs + all.get(0).innerHTML = html; + var page = all.find('[data-role="page"]'); if ( page.attr('id') ) { page = wrapNewPage( page );