Both popups are appearing at the same time instead of one after another
Hello, look at these two popups that i have created.
first popup is "image of a house with click here text"
second popup is "name/email etc. submit form"
now the problem is as you can see on the "Tryit editor", both popups are visible at the same time.
but i need the first popup to appear first and when a visitor clicks"click here" text, first popup should disappear and email submit popup should appear.
- <!-- POP UP Start --><!-- <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> -->
- <script>
- $(document).ready(function(){
- $('#overlay').fadeIn(500,function(){
- $('#popup').show();
- });
-
- $(".close").on('click', function() {
- $('#popup').hide();
- $('#overlay').fadeOut(500);
- });
- });
- </script>
- <div id="overlay" style ="position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #000; opacity: 0.6; filter: alpha(opacity=60); z-index: 5; display: none"></div>
- <div id="popup" style="position:fixed; display:hidden; top:250px; left:50%; width:500px; height:auto; margin-left:-250px; background-color:#FFFFFF; z-index:6; padding:20px; border:solid 5px #2A1D9E; border-radius:5px;">
- <a href=https://www.google.com class="close" style="display: block; float:right; position:relative; top:-15px; right: -15px; height: 20px; color:#FFFFFF;">X</a>
- <p style=color:#FFFFFF;">
- </p>
- <p style="margin:0; padding:5px; text-align:justify;">
- <a href=https://www.google.com><img class="aligncenter wp-image-21 size-full" src=https://images1.sykesassets.co.uk/assets/_files/cached/property/1500x1125/2906/sc_131608230613_2906_12.jpg alt="ALT TEXT" width="500" height="300" /></a>
- </p>
- <a href=https://www.google.com style="margin:0; padding:5px; text-align:right; float:right; color:#333333;">CLICK HERE</a>
- </div>]
- <div id="overlay" style ="position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #000; opacity: 0.6; filter: alpha(opacity=60); z-index: 5; display: none"></div>
- <div id="popup" style="position:fixed; display:hidden; top:150px; left:50%; width:500px; height:auto; margin-left:-250px; background-color:#FFFFFF; z-index:6; padding:20px; border:solid 5px #2A1D9E; border-radius:5px;">
- <p style=color:#FFFFFF;"></p>
- <h2>Please enter your details to send the goods</h2>
- Name:<br>
- <input type="text" name="name"><br>
- E-mail:<br>
- <input type="text" name="mail"><br>
- Comment:<br>
- <input type="text" name="comment" size="50"><br><br>
- <input type="submit" onclick="location.href='http://google.com';"value="Send">
- <input type="reset" onclick="location.href='http://google.com';" value="Reset">
- </div>
- <!-- POP UP End -->