Reputation:
First of all, I have 5 modals in layout.
And I am calling them like:
MessageBox.show('modaltype', 'message');
So my actual concern is, my function is sth like:
var MessageBox = function($,undefined) {
return {
show = function(type,message) {
}
}
}(jQuery)
Is this the right way to do so? Do you suggest sth more efficient?
Upvotes: 0
Views: 322
Reputation: 1815
Here you can check the jquery btn click function call bootstrap modal:
$("#buttom id").click(function(event){
$("#modalboxid").modal('show');
});
Upvotes: 1