I think in @Pushker's answer he typed define
where he actually wanted to type require
:
require(["bootbox"], function(bootbox) {
bootbox.alert("Hello Bootbox");
});
(he also mistyped a }
for a {
.
Furthermore, when having multiple dependencies you should also specify these as parameter's of the function within your require
AND make sure they are in the same order as in the string array parameter. E.g. like so:
require(["jquery", "jquery.bootstrap", "jquery.bootbox", ...],
function(jquery, bootstrap, bootbox, ...) {
bootbox.alert("Hi");
}
...
});
Check my fiddle for a working Bootbox example: http://jsfiddle.net/bartvanderwal/L1emr4up/