Skip to content

Commit

Permalink
Core: make sure remote is executed last
Browse files Browse the repository at this point in the history
Fixes gh-711
Closes gh-807
  • Loading branch information
bpinto authored and jzaefferer committed Jan 14, 2014
1 parent 0a18ae6 commit ad91b6f
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,19 @@ $.extend($.fn, {
), element);

// make sure required is at front
var param;
if ( data.required ) {
var param = data.required;
param = data.required;
delete data.required;
data = $.extend({required: param}, data);
$(element).attr("aria-required", "true");
data = $.extend({ required: param }, data );
$(element).attr( "aria-required", "true" );
}

// make sure remote is at back
if ( data.remote ) {
param = data.remote;
delete data.remote;
data = $.extend( data, { remote: param });
}

return data;
Expand Down

0 comments on commit ad91b6f

Please sign in to comment.