Created
March 24, 2011 17:38
-
-
Save edelabar/885496 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Event.observe( window, "load", | |
function(e) { | |
$$('.lightwindow').each( | |
function( elem ) { | |
if( elem.href ) { | |
if( elem.href.indexOf('?') == -1 ) { | |
elem.href += '?'; | |
} | |
elem.href += "lightwindow=true"; | |
} | |
} | |
); | |
} | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if( $_GET['lightwindow'] != 'true' ) { ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" debug="true"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-16" /> | |
<title>Example Lighwindow (JavaScript Disabled)</title> | |
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" /> | |
</head> | |
<body> | |
<?php } ?> | |
<div class="container" <?php if( $_GET['lightwindow'] == 'true' ) { echo "style=\"width: 300px;\""; } ?>> | |
<?php if( $_GET['lightwindow'] != 'true' ) { ?><h1 id="header">Header</h1><?php } ?> | |
<p> | |
This is my lightbox content, if JavaScript is enabled on your browser you should be seeing it in a LightWindow, | |
if it's not, you should see it with a header and footer similar to <a href="index.html">this page</a>. | |
</p> | |
<?php if( $_GET['lightwindow'] != 'true' ) { ?> | |
<ul id="footer"> | |
<li><a href="/">Back to EricDeLabar.com</a></li> | |
</ul> | |
<?php } ?> | |
</div> | |
<?php if( $_GET['lightwindow'] != 'true' ) { ?> | |
</body> | |
</html> | |
<?php } ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment