Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update js/jquery.mobile.navigation.js

  • Loading branch information...
commit 205cc06ddfab757ac63a576563e93d05d61d83b9 1 parent 5f7cadc
@Azuo authored
Showing with 8 additions and 3 deletions.
  1. +8 −3 js/jquery.mobile.navigation.js
View
11 js/jquery.mobile.navigation.js
@@ -762,7 +762,8 @@ define( [
&& RegExp.$1
&& dataUrlRegex.test( RegExp.$1 )
&& RegExp.$1 ) {
- url = fileUrl = path.getFilePath( RegExp.$1 );
+ /* url = fileUrl = path.getFilePath( RegExp.$1 ); */
+ url = fileUrl = path.getFilePath( $( "<div>" + RegExp.$1 + "</div>" ).text() );
}
if ( base ) {
@@ -770,12 +771,16 @@ define( [
}
//workaround to allow scripts to execute when included in page divs
- all.get( 0 ).innerHTML = html;
+ /* all.get( 0 ).innerHTML = html; */
+ //IE6-8 requires a non-empty element before <script>, otherwise ignores the script
+ all.get( 0 ).innerHTML = "<div style=\"display:none;\">&nbsp;</div>" + html.split( /<\/?body[^>]*>/gmi )[1];
page = all.find( ":jqmData(role='page'), :jqmData(role='dialog')" ).first();
//if page elem couldn't be found, create one and insert the body element's contents
if( !page.length ){
- page = $( "<div data-" + $.mobile.ns + "role='page'>" + html.split( /<\/?body[^>]*>/gmi )[1] + "</div>" );
+ /* page = $( "<div data-" + $.mobile.ns + "role='page'>" + html.split( /<\/?body[^>]*>/gmi )[1] + "</div>" ); */
+ all.children().first().remove();
+ page = all.attr( "data-" + $.mobile.ns + "role", "page" );
}
if ( newPageTitle && !page.jqmData( "title" ) ) {
Please sign in to comment.
Something went wrong with that request. Please try again.