Reputation: 15293
I would like to show a bootstrap
modal for my app. In which I would like to pass the size
, title
and content
parameters. so using a single modal i can use multiple requirement.
with all above information i would like to pass the default options
too.
at present i do like this:
var options = {
"backdrop" : "static",
"keyboard" : false,
"show" : false
}
$('#basicModal').modal(options);
How can i extend this in to my requirement using the bootstrap
inbuild/custom functions?
Any one help me please?
Update
I find a way to pass params, how it works?
Upvotes: 0
Views: 64
Reputation: 1258
http://jsfiddle.net/dwojLdjk/5/
var options = {
"backdrop" : "static",
"keyboard" : false,
"show" : true
}
$('#showModal').click(function() {
$("#resultFormModal").find("h4.modal-title").html('new title');
$("#resultFormModal").find("div.modal-body").html('new message');
$("#resultFormModal").modal(options);
});
Upvotes: 1