Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/jquery.form.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
method = options.method || options.type || this.attr2('method');
action = options.url || this.attr2('action');

url = (typeof action === 'string') ? $.trim(action) : '';
url = (typeof action === 'string') ? action.trim() : '';
url = url || window.location.href || '';
if (url) {
// clean url (don't include hash vaue)
Expand Down Expand Up @@ -206,7 +206,7 @@
var qx, a = this.formToArray(options.semantic, elements, options.filtering);

if (options.data) {
var optionsData = $.isFunction(options.data) ? options.data(a) : options.data;
var optionsData = typeof options.data === 'function' ? options.data(a) : options.data;

options.extraData = optionsData;
qx = $.param(optionsData, traditional);
Expand Down Expand Up @@ -268,7 +268,7 @@
});

} else if (options.success) {
if ($.isArray(options.success)) {
if (Array.isArray(options.success)) {
$.merge(callbacks, options.success);
} else {
callbacks.push(options.success);
Expand Down Expand Up @@ -479,7 +479,7 @@
}

} else {
$io = $('<iframe name="' + id + '" src="' + s.iframeSrc + '" />', ownerDocument);
$io = $('<iframe name="' + id + '" src="' + s.iframeSrc + '" ></iframe>', ownerDocument);
$io.css({position: 'absolute', top: '-1000px', left: '-1000px'});
}
io = $io[0];
Expand Down Expand Up @@ -985,7 +985,7 @@
}

options = options || {};
options.delegation = options.delegation && $.isFunction($.fn.on);
options.delegation = options.delegation && typeof $.fn.on === 'function';

// in jQuery 1.3+ we can fix mistakes with the ready state
if (!options.delegation && this.length === 0) {
Expand Down Expand Up @@ -1123,7 +1123,7 @@
return a;
}

if ($.isFunction(filtering)) {
if (typeof filtering === 'function') {
els = $.map(els, filtering);
}

Expand Down