How to add a Lightbox pop-up box to your website

Home > Search > How-to
  by

To use the Web Plus Lightbox, add the following to the HEAD tag of your markup. Notice the source for the jquery files is wpscripts. This means you need to create a directory in the document root of your Web server and add the jquery files to the wpscripts directory.

<script type="text/javascript" src="wpscripts/jquery.js"></script>
<script type="text/javascript" src="wpscripts/jquery.wplightbox.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('a[rev*=wplightbox]').wplightbox({ strImgDir: 'wpimages/', strScriptDir: 'wpscripts/', nButtonType: 2, nBorderType: 6 });
})
</script>

 

Following is an example of creating a Lighbox pop-up box from an href.

<a href='example.jpg' target='_self' rev='wplightbox~#~~#~'> click here </a>

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter in the box below so that we can be sure you are a human.




Comments