open modal in jquery code example
Example 1: onclick open modal jquery
$('#myModal').modal('toggle');
$('#myModal').modal('show');
$('#myModal').modal('hide');
Example 2: open modal in jqwuery
$("#myModal").modal('show')
Example 3: jquery modal popup
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.css" />
Embed modal HTML in document
Create a link with rel="modal:open" and set the href attribute to the modal's DOM id.
<div id="ex1" class="modal">
<p>Thanks for clicking. That felt good.</p>
<a href="#" rel="modal:close">Close</a>
</div>
<p><a href="#ex1" rel="modal:open">Open Modal</a></p>
Example 4: how to make popup modal in jquery with example
<div class="modal">
<p>Second AJAX Example!</p>
</div>
Example 5: jquery modal popup
<div id="ex1" class="modal">
<p>Thanks for clicking. That felt good.</p>
<a href="#" rel="modal:close">Close</a>
</div>
<p><a href="#ex1" rel="modal:open">Open Modal</a></p>
Example 6: onclick open modal jquery
$('#my-modal').modal({
show: 'false'
});