javascript - Display a Modal on button click using Jquery -
i want display modal on button click. below code.
<input type="button" id="button1" value="button" onclick="myfunction()"/> <div id="openmodal" class="modaldialog"> <div> <a href="#close" title="close" class="close">x</a> <h2> modal box</h2> <p> hello world</p> </div> </div>
this unfinished script.
<script type="text/javascript"> $(document).ready(function () { }); </script>
show
openmodal div on button1
click.
$('#button1').on('click', function() { $('#openmodal').show(); });
no need of onclick="myfunction()"
on button
Comments
Post a Comment