bootstrap-modal Examples to Show bootstrap model with different attributes and Controls Manipulating Dialog Title

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Example

Include below CSS to your code

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap3-dialog/1.34.7/css/bootstrap-dialog.min.css"/>

HTML Code for your Model to show easily

Click Button next to see bootstrap popup with simple message and Title and Buttons that manipulates the title.
    <button class="btn btn-primary" type="button" onclick="showModalNow()">Click Me</button>

Include script below in your code to get bootstrap-model working easily

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap3-dialog/1.34.7/js/bootstrap-dialog.min.js" type="text/javascript" />
<script>
    function showModalNow(){
        BootstrapDialog.show({
            title: 'Default Title',
            message: 'First time showing Title.',
            buttons: [{
                label: 'change to Title 1',
                action: function(dialog) {
                    dialog.setTitle('Title-1');
                }
            }, {
                label: 'change to Title 2',
                action: function(dialog) {
                    dialog.setTitle('Title 2');
                }
            }]
        });
    }
</script>


Got any bootstrap-modal Question?