Clarified data-ajax=false on forms. Fixes #1134

This commit is contained in:
scottjehl 2011-03-15 18:49:39 -04:00
parent b9d0349975
commit 09ffa3aa5f

View file

@ -612,10 +612,11 @@
/* Event Bindings - hashchange, submit, and click */
//bind to form submit events, handle with Ajax
$( "form[data-ajax!='false']" ).live('submit', function(event){
$( "form" ).live('submit', function(event){
if( !$.mobile.ajaxEnabled ||
//TODO: deprecated - remove at 1.0
!$.mobile.ajaxFormsEnabled ){ return; }
!$.mobile.ajaxFormsEnabled ||
$(this).is( "[data-ajax='false']" ) ){ return; }
var type = $(this).attr("method"),
url = path.clean( $(this).attr( "action" ) );