diff --git a/js/jquery.mobile.js b/js/jquery.mobile.js index ee51e33b..44b89f34 100644 --- a/js/jquery.mobile.js +++ b/js/jquery.mobile.js @@ -108,8 +108,12 @@ //for form submission $('form').live('submit', function(){ var type = $(this).attr("method"), - url = $(this).attr( "action" ).replace( location.protocol + "//" + location.host, ""), - external = /^(:?\w+:)/.test( url ); + url = $(this).attr( "action" ).replace( location.protocol + "//" + location.host, ""); + + //external submits use regular HTTP + if( /^(:?\w+:)/.test( url ) ){ + return; + } //if it's a relative href, prefix href with base url if( url.indexOf('/') && url.indexOf('#') !== 0 ){ @@ -126,9 +130,7 @@ type === "get" ); return false; - }); - - + }); //click routing - direct to HTTP or Ajax, accordingly jQuery( "a" ).live( "click", function(event) {