Skip to content
Loading
  
  •  
  •  
    1. $(document).ready(function () {  
    2.     $(".popup").hide();  
    3.     $(".openpop").click(function (e) {  
    4.         e.preventDefault();  
    5.         $("iframe").attr("src", $(this).attr('href'));  
    6.         $(".links").fadeOut('slow');  
    7.         $(".popup").fadeIn('slow');  
    8.     });  
    9.   
    10.     $(".close").click(function () {  
    11.         $(this).parent().fadeOut("slow");  
    12.         $(".links").fadeIn("slow");  
    13.     });  
    14. }); 
    +1
  • Mageshwaran R
    +1
    Hey Sam,
    Try this code,
    HTML: 
    1. <div class="links">  
    2. <a class="openpopUp" href="https://www.c-sharpcorner.com/">Link 1a>  
    3. div>  
    4. <div class="wrapper">  
    5.     <div class="popup">  
    6.         <iframe src="">  
    7.             <p>Your browser does not support iframes.p>  
    8.         iframe>  
    9. <a href="#" class="close">Xa>  
    10.   
    11.     div>  
    12. div>  
    Script: 
     
    1. $(document).ready(function () {  
    2.     $(".popup").hide();  
    3.     $(".openpopUp").click(function (e) {  
    4.         e.preventDefault();  
    5.         $("iframe").attr("src", $(this).attr('href'));  
    6.         $(".links").fadeOut('slow');  
    7.         $(".popup").fadeIn('slow');  
    8.     });  
    9.   
    10.     $(".close").click(function () {  
    11.         $(this).parent().fadeOut("slow");  
    12.         $(".links").fadeIn("slow");  
    13.     });  
    14. });  
     
    +1
  • Sachin Singh
    +1
    hii sam please share your code , couldn't understand your specific issue.
    +1