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

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -