Display a Modal on button click using Jquery

0 votes

I want to display my Modal on button click. Below is my 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 is my unfinished script.

<script type="text/javascript">
    $(document).ready(function () { 

    });
</script>

Jul 1 in Web Development by gaurav
• 17,000 points
12 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP