Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the AMD header for use with require.js module definitions only … #665

Merged
merged 1 commit into from
Jan 2, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 13 additions & 2 deletions dist/js/bootstrap-multiselect.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,18 @@
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
!function ($) {
(function (root, factory) {
// check to see if 'knockout' AMD module is specified if using requirejs
if (typeof define === 'function' && define.amd &&
typeof require === 'function' && typeof require.specified === 'function' && require.specified('knockout')) {

// AMD. Register as an anonymous module.
define(['jquery', 'knockout'], factory);
} else {
// Browser globals
factory(root.jQuery, root.ko);
}
})(this, function ($, ko) {
"use strict";// jshint ;_;

if (typeof ko !== 'undefined' && ko.bindingHandlers && !ko.bindingHandlers.multiselect) {
Expand Down Expand Up @@ -1627,4 +1638,4 @@
$("select[data-role=multiselect]").multiselect();
});

}(window.jQuery);
});