我想使用bootstrap-multiselect和require.js。 我在墊片中添加了以下幾行:使用bootstrap-multiselect和require.js
shim: {
bootstrap : {
deps: [ 'jquery', 'jquery_ui']
},
bootstrap_multiselect: {
deps:['jquery', 'jquery_ui', 'bootstrap'],
exports: 'multiselect'
}
}
這不起作用。 我得到以下異常:
"TypeError: $(...) multiselect is not a function"
以下線 -
$('#SomeDiv').multiselect({
有誰知道什麼是出口增加,使這項工作?
我也更新了此鏈接中的引導,多選文件: https://github.com/davidstutz/bootstrap-multiselect/pull/665/files
我覺得我做錯了什麼墊片中的文件。
後,我想你需要更何況這裏的出口應該有名稱爲「多選」無全局變量。 只是想知道,你可以請檢查你的路徑在require.config你指向的位置bootstrap_multiselect.js文件? – Nitesh
嗨,路徑是正確的,但我找到了答案! – user2549980