129 Web Design is a Web Design, Web Development and Web Marketing firm based in Portland, Maine.
Checkout Our blog.  Discuss coding, random tech issues and off topic items. Login to your 129 portal.  The place to get information regarding web design, web development and web marketing services. Answers to common questions regarding our web design, web development and web marketing services.
Checkout our portfolio to see examples of web design, web development and web marketing. Checkout our services to learn more about web design, web development and web marketing. 129 Web Design is a Web Design, Web Development and Web Marketing firm based in Portland, Maine. See what's new in our world of web design, web development and web marketing. Contact us to learn more about our web design, web development and web marketing services. Have a question about our web design, web development and web marketing services?  Click here!

JavaScript pop up window alternative

This method still uses JavaScript, but it is paired with CSS to produce a less annoying and invasive outcome.

1)      Develop the content that you would normally open in a pop up.

2)      Create a div tag in the “opener” page.  Hide the div tag using the visibility and display properties and specify the position property as “absolute” and set the z-index property to a plane that is greater than 1 and by itself. 

3)      Use the newly created/hidden div as a container and paste the content from step one between the opening and closing tags of the div.

4)      Create a JavaScript function that “unhides” the div – unleashing all of the content you created. Once the div is “turned on” the div breaks away from the content around it and it “floats” to the plane that you specified with the z-index.   The example below is a javascript toggle function that will turn the div off or on depending on which state it currently is in. 

function div_toggle(id){               

var imagediv = document.getElementById(id);

if (imagediv.style.display==”none”){
        imagediv.style.display=”block”;
        imagediv.style.visibilty=”visible”;                             
}
else{
imagediv.style.display=”none”;
imagediv.style.visibilty=”hidden”;

}

}

Play around with different CSS positioning techniques to give you your desired affect. 

To see a live working example, go to our portfolio page and click on a thumbnail of any of the websites.

If you are interested and seeing more detailed instructions, send us an email.

Leave a Reply


Portfolio | Services | Company | News | Contact | Site Map | F.A.Q. | RSS RSS / Subscribe | Current Promo | Partnerships | Privacy Policy | Terms & Conditions

129 Web Design & Marketing | PO Box 18207 | Portland, Maine 04112