Skip to content Skip to sidebar Skip to footer

Bootstrap Modal Open On Clicking Image

when i click menu-5_1.png the below model should pop up
  • Solution 1:

    Try:

    $(document).ready(function () {
      $("ul").on('click','#pop',function () {
        $('#myModal').modal('show'); 
      });
    });
    

    Solution 2:

    I think you have missed below reference libraries in your application.

    https://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css

    https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js

    https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha/js/bootstrap.min.js

    $(document).ready(function () {
      $("#pop").click(function () {
        $('#myModal').modal('show'); 
      });
    });
    

    Demo:

    https://jsfiddle.net/zz9wqroc/

  • Post a Comment for "Bootstrap Modal Open On Clicking Image"