Lightbox without uploading!

  • 3
  • Idea
  • Updated 9 years ago
Want a lightbox that you can put anything in?
well here's the code!
First we include the Jquery library:

<script type="text/javascript" src="

then the javascript:

<script type="text/javascript">
function showlbox()
$('#lboxbackground').fadeTo('500', 0.5);
function hidelbox()

at last the html:

<a href="#" onclick="showlbox();">your link</a>
<div id="lboxbackground" style="background:black; display:none;
position:absolute; height:100%; width:100%; left:0px; top:0px;
z-index:1000;"><!--leave this place alone--></div>
<div id="lboxclose" onclick="hidelbox()" style="cursor: hand; background-image:
/close.png'); display:none;
position:absolute; height:20px; width:20px; right:20%; top:19%;
z-index:1002"><!--leave this place alone--></div>
<div id="lboxcontent" style="background:darkgrey; border-radius: 10px;
display:none; position:absolute; height:60%; width:60%; left:20%; top:20%;
&lt!--your content here-->


That's it!
for a example, click Here

Photo of Kevin


  • 475 Posts
  • 29 Reply Likes
  • happy

Posted 9 years ago

  • 3
Photo of Kevin


  • 475 Posts
  • 29 Reply Likes
hey Nathan, i've posted this on your community forum here: