HOW TO OPEN BOOTSTRAP MODAL POPUP

Goti Bandu

Total Post:119

Points:835
Posted by  Goti Bandu
 2002  View(s)
Ratings:
Rate this:
i'm want to open bootstrap modal popup smoothly
  1. Kamlakar Singh

    Post:194

    Points:1396
    Re: How to open Bootstrap modal popup

    Hi goti Bandu

    i'm try to make bootstrap modal popup so firstly use three files

    <link href="~/Content/bootstrap-3.1.1-dist/css/bootstrap.min.css" rel="stylesheet" />
    <script src="~/script/jquery-2.1.0.min.js"></script>
    <script src="~/script/bootstrap-3.1.1-dist/js/bootstrap.min.js"></script>
    html code here:
    <div class="container">
        <br />
        <br />
        <button class="btn btn-primary" id="launchmodal" data-toggle="modal" data-target="#myModal">
            Launch demo modal
        </button>
    </div>
     
    <!-- Modal -->
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                    <h4 class="modal-title" id="myModalLabel">Modal title</h4>
                </div>
                <div class="modal-body">
                    ...
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                    <button type="button" class="btn btn-primary">Save changes</button>
                </div>
            </div>
        </div>
    </div>

    javascript code:

    <script>
        $(document).ready(function () {
            $('#launchmodal').click(function () {
                $('#myModal').modal({
                    keyboard: false
                })
            });
     
        });
    </script>

      Modified On Apr-05-2018 06:25:41 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!