www.webdeveloper.com
Results 1 to 2 of 2

Thread: having more than one popup page

  1. #1
    Join Date
    Apr 2012
    Posts
    110

    having more than one popup page

    i have the following code on my site. i have two different boxes that I would like to show up. what would be the best way to do it?

    jquery:
    Code:
    // Position modal box in the center of the page
        jQuery.fn.center = function () {
            this.css("position","absolute");
            this.css("top", ( jQuery(window).height() - this.height() ) / 2+jQuery(window).scrollTop() + "px");
            this.css("left", ( jQuery(window).width() - this.width() ) / 2+jQuery(window).scrollLeft() + "px");
            return this;
          }
    
        jQuery(".modal-profile").center();
    
        // Set height of light out div  
        jQuery('.modal-lightsout').css("height", jQuery(document).height());    
    
        
        jQuery('a[rel="modal-profile"]').click(function() {
            jQuery('.modal-profile').fadeIn("slow");
            jQuery('.modal-lightsout').fadeTo("slow", .5);
        });
    
        // closes modal box once close link is clicked, or if the lights out divis clicked
        jQuery('a.modal-close-profile, .modal-lightsout').click(function() {
            jQuery('.modal-profile').fadeOut("slow");
            jQuery('.modal-lightsout').fadeOut("slow");
        });
    and then the html:

    Code:
    <div class="modal-lightsout"></div>
    <div class="modal-profile">
        <h2>File Upload</h2>
        <a href="#" title="Close this window" class="modal-close-profile"><img border="0px" src="http://mysite.com/images/x.png" alt="Close profile window" /></a>
        
        <iframe src="http://mysite.com/images/upload.php" scrolling="no" width="350px" height="400px" frameborder="0"></iframe>
        </div>

  2. #2
    Join Date
    Apr 2012
    Posts
    110
    anybody???

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles