Skip to content

Commit 82355b0

Browse files
committed
v3.46.0; add AMD support
1 parent 485b4e2 commit 82355b0

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

form.jquery.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"upload",
88
"ajax"
99
],
10-
"version": "3.45.0",
10+
"version": "3.46.0",
1111
"author": {
1212
"name": "M. Alsup",
1313
"url": "http://jquery.malsup.com"

jquery.form.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* jQuery Form Plugin
3-
* version: 3.45.0-2013.10.17
3+
* version: 3.46.0-2013.11.21
44
* Requires jQuery v1.5 or later
55
* Copyright (c) 2013 M. Alsup
66
* Examples and documentation at: http://malsup.com/jquery/form/
@@ -9,7 +9,19 @@
99
* https://github.com/malsup/form#copyright-and-license
1010
*/
1111
/*global ActiveXObject */
12-
;(function($) {
12+
13+
// AMD support
14+
(function (factory) {
15+
if (typeof define === 'function' && define.amd) {
16+
// using AMD; register as anon module
17+
define(['jquery'], factory);
18+
} else {
19+
// no AMD; invoke directly
20+
factory( (typeof(jQuery) != 'undefined') ? jQuery : window.Zepto );
21+
}
22+
}
23+
24+
(function($) {
1325
"use strict";
1426

1527
/*
@@ -1201,4 +1213,5 @@ function log() {
12011213
}
12021214
}
12031215

1204-
})( (typeof(jQuery) != 'undefined') ? jQuery : window.Zepto );
1216+
}));
1217+

0 commit comments

Comments
 (0)