What is ChillBox ?

Inspired by Lokesh Dhakar's Lightbox, ChillBox is a simple, unobtrusive script used to overlay images on top of the current page. ChillBox has been developed using the jQuery Framework and is available to download from this page.

Why use ChillBox ?

Unlike other lightbox versions, ChillBox does not require the use of images for buttons and is fully rendered using jQuery.

ChillBox is fully customisable and you can change the range of options to create a unique version of ChillBox that works with a website theme.

ChillBox is fully compatible with web browsers Internet Explorer, Firefox, Opera, Safari and Google Chrome.

Download ChillBox

Download the latest version of ChillBox below.

Examples

Single image without title. *

A47 Acle

Over sized image with title. *

Chill Web Designs - Studio

Group images without titles. *

Group images with titles. *

How to install ChillBox

To install ChillBox on your site all you require is the latest version of ChillBox which you can download above and the latest version of the jQuery Framework which you can donwnload by clicking here. Simply follow the steps below and see how easy it is to install ChillBox on your site.

Step 1 - Open or Create a new web document.

Open your web page that you would like to add to ChillBox to or create a new HTML document.

Step 2 - Download jQuery

ChillBox is a jQuery Plugin, therefore you will require jQuery for it to work. Simply download the latest version from the jQuery Website and save it to your scripts folder.

Alternatively you can add the following script to your head section of your web page which is what we are going to use in this example.

<head>

<script
type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>

</head>

Step 3 - Download ChillBox

Downlaod ChillBox by clicking the link above and save it to your scripts folder in this example we are using 'js' as our script folder and add it to the head section of your page.

<head>

<script
type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script
type="text/javascript" src="js/chillbox-packed.js"></script>

</head>

Step 4 - Add ChillBox to a single link

Now we are ready to add ChillBox to our html code. To do this create a anchor link attribute with the path to the image that you wish to open up using ChillBox. Now add the rel attribute next with the value of ChillBox and then add a title attribute with the value of your image title.

We then need to tell the ChillBox plugin what to apply its effects to. We do this by adding a bit of script at the top of the head section that says apply ChillBox to rel value equal to ChillBox.

<head>

<script
type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script
type="text/javascript" src="js/chillbox-packed.js"></script>
<script
type="text/javascript">

$(function(){
$('[rel$=ChillBox]').ChillBox();
});

</script>

</head>
<body>

<a href="images/gallery/the-mint.jpg" rel="ChillBox" title="The Mint Arcade - Great Yarmouth">Click me</a>

</body>

Result: Click me

Step 5 - Replace link text with a thumbnail image.

To add a thumbnail simply replace the link text with an image which has a path to the thumbnail of the larger image that you want to open using ChillBox.

<head>

<script
type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script
type="text/javascript" src="js/chillbox-packed.js"></script>
<script
type="text/javascript">

$(function(){
$('[rel$=ChillBox]').ChillBox();
});

</script>
</head>
<body>

<a href="images/gallery/the-mint.jpg" rel="ChillBox" title="The Mint Arcade - Great Yarmouth"><img src="images/gallery/the-mint-thumb.jpg" alt="Image of the Mint Arcade in Great Yarmouth" /></a>

</body>

Result:

Step 6 - Group images together using the Group function

To group images together replace rel="ChillBox" with rel="ChillBoxGroup" and add this to the links of images that you want to group together.

<head>

<script
type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script
type="text/javascript" src="js/chillbox-packed.js"></script>
<script
type="text/javascript">

$(function(){
$('[rel$=ChillBoxGroup]').ChillBox();
});

</script>
</head>
<body>

<a href="images/gallery/a47-new-acle-road.jpg" rel="ChillBoxGroup" title="Corsa VXR - Acle New Road">
<img src="images/gallery/a47-new-acle-road-thumb.jpg" alt="Image of a Corsa VXR on Acle New Road" /></a>
<a href="images/gallery/a47-acle.jpg" rel="ChillBoxGroup" title="Traffic - A47 Acle">
<img src="images/gallery/a47-acle-thumb.jpg" alt="Image of Traffic - A47 Acle" /></a>
<a href="images/gallery/wellington-peir.jpg" rel="ChillBoxGroup" title="Wellington Peir - Great Yarmouth">
<img src="images/gallery/wellington-peir-thumb.jpg" alt="Image of the Wellington Peir in Great Yarmouth" /></a>

</body>

Result:

Step 7 - Adding more Groups

Adding more Groups is simple, simply create rel="ChillBoxGroup" followed by a number like so rel="ChillBoxGroup1", rel="ChillBoxGroup2", rel="ChillBoxGroup3" etc. for each group.

<head>

<script
type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script
type="text/javascript" src="js/chillbox-packed.js"></script>
<script
type="text/javascript">

$(function(){
$('[rel$=ChillBoxGroup1],[rel$=ChillBoxGroup2]').ChillBox();
});

</script>
</head>
<body>

<a href="images/gallery/a47-new-acle-road.jpg" rel="ChillBoxGroup1" title="Corsa VXR - Acle New Road">
<img src="images/gallery/a47-new-acle-road-thumb.jpg" alt="Image of a Corsa VXR on Acle New Road" /></a>
<a href="images/gallery/a47-acle.jpg" rel="ChillBoxGroup1" title="Traffic - A47 Acle">
<img src="images/gallery/a47-acle-thumb.jpg" alt="Image of Traffic - A47 Acle" /></a>
<a href="images/gallery/wellington-peir.jpg" rel="ChillBoxGroup1" title="Wellington Peir - Great Yarmouth">
<img src="images/gallery/wellington-peir-thumb.jpg" alt="Image of the Wellington Peir in Great Yarmouth" /></a>

<br /><br />

<a href="images/gallery/corsa-vxr-dash.jpg" rel="ChillBoxGroup2" title="Corsa VXR - Dashboard">
<img src="images/gallery/corsa-vxr-dash-thumb.jpg" alt="Image of a Corsa VXR - Dashboard" /></a>
<a href="images/gallery/vxr-dash-xmas-tree.jpg" rel="ChillBoxGroup2" title="Corsa VXR - Dashboard">
<img src="images/gallery/vxr-dash-xmas-tree-thumb.jpg" alt="Image of Corsa VXR - Dashboard" /></a>
<a href="images/gallery/the-mint.jpg" rel="ChillBoxGroup2" title="The Mint Arcade - Great Yarmouth">
<img src="images/gallery/the-mint-thumb.jpg" alt="Image of the the Mint Arcade - Great Yarmouth" /></a>


</body>

Result:

ChillBox Options

ChillBox has a many options allowing you to fully customise your own version that suits your website. You can change the options at the top of the ChillBox script or by passing the value to the plugin like so: $('[rel$=ChillBox]').ChillBox({option:'value'});

OptionValue RangeDefault ValueDesciption
OLO0 - 10075Overlay opacity in (%)
OLC#000000 - #FFFFFF#000000Background overlay colour using (hex colour codes)
LTC#000000 - #FFFFFF#FFFFFFLoading text colour using (hex colour codes)
CBBC#000000 - #FFFFFF#000000ChillBox background colour using (hex colour codes)
CBTC#000000 - #FFFFFF#FFFFFFChillBox title and counter colour using (hex colour codes)
BCCB#000000 - #FFFFFF#000000ChillBox border and image border colour using (hex colour codes)
BC#000000 - #FFFFFF#000000ChillBox button background colour using (hex colour codes)
BTC#000000 - #FFFFFF#FFFFFFChillBox button text colour using (hex colour codes)
BBCH#000000 - #FFFFFF#007EFFChillBox button text colour on hover using (hex colour codes)
BTS10 - 1611ChillBox button text size in (px)
CBTS10 - 1612ChillBox title text size in (px)
LTS10 - 2212Loading text size in (px)
LTtext valueLoading...Loading text value
FIOL0 - 5000250Overlay fade in time (milliseconds)
CBFI0 - 5000400ChillBox fade in time time (milliseconds)
CBFO0 - 5000400ChillBox and Overlay fade out time time (milliseconds)
CLSBtext valueXChillBox close button text value
PREVtext value◄ (&#9668;)ChillBox previous button text value
NEXTtext value► (&#9658;)ChillBox next button text value
EKBBtrue / falsetrueEnable keyboard buttons, (N / >) - Next, (P / <) - Prev, (ESC / C / X) - Close
CBCCclose / prev / next ChillBox click image function
OLCCtrue / falsetrueClose ChillBox by clicking the overlay
LOOPtrue / falsefalseEnable ChillBox next / prvious image loop
ECBCtrue / falsetrueShow ChillBoxGroup image counter
STtrue / falsetrueShow ChillBox titles
SHADtrue / falsetrueShow ChillBox shadow
CBFFCSS font-family propertyArial, Helvetica, sans-serifFont family


Applying options to different groups

In this example we are going to change the ChillBox options for the second group ( rel="ChillBoxGroup2" ) making the ChillBox colour white, the title and counter black and border colour dark grey. The first group ( rel="ChillBoxGroup1" ) will stay as the default options.

<head>

<script
type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script
type="text/javascript" src="js/chillbox-packed.js"></script>
<script
type="text/javascript">

$(function(){
$('[rel$=ChillBoxGroup1]').ChillBox();
$('[rel$=ChillBoxGroup2]').ChillBox({CBBC:'#FFFFFF',CBTC:'#000000',BCCB:'#666666'});
});

</script>

</head>
<body>

<a href="images/gallery/a47-new-acle-road.jpg" rel="ChillBoxGroup1" title="Corsa VXR - Acle New Road">
<img src="images/gallery/a47-new-acle-road-thumb.jpg" alt="Image of a Corsa VXR on Acle New Road" /></a>
<a href="images/gallery/a47-acle.jpg" rel="ChillBoxGroup1" title="Traffic - A47 Acle">
<img src="images/gallery/a47-acle-thumb.jpg" alt="Image of Traffic - A47 Acle" /></a>
<a href="images/gallery/wellington-peir.jpg" rel="ChillBoxGroup1" title="Wellington Peir - Great Yarmouth">
<img src="images/gallery/wellington-peir-thumb.jpg" alt="Image of the Wellington Peir in Great Yarmouth" /></a>

<br /><br />

<a href="images/gallery/corsa-vxr-dash.jpg" rel="ChillBoxGroup2" title="Corsa VXR - Dashboard">
<img src="images/gallery/corsa-vxr-dash-thumb.jpg" alt="Image of a Corsa VXR - Dashboard" /></a>
<a href="images/gallery/vxr-dash-xmas-tree.jpg" rel="ChillBoxGroup2" title="Corsa VXR - Dashboard">
<img src="images/gallery/vxr-dash-xmas-tree-thumb.jpg" alt="Image of Corsa VXR - Dashboard" /></a>
<a href="images/gallery/the-mint.jpg" rel="ChillBoxGroup2" title="The Mint Arcade - Great Yarmouth">
<img src="images/gallery/the-mint-thumb.jpg" alt="Image of the the Mint Arcade - Great Yarmouth" /></a>


</body>

Result:

Support

Can I use the script in a commercial website?

ChillBox is licensed under a Creative Commons Attribution 3.0 Unported License. For correct attribution, all that is required is that you leave the details and link at the top of the chillbox-packed.js (Javascript File). A html link would be appreciated, but it is not required.

Creative Commons License


What versions of jQuery will ChillBox work with?

ChillBox has been tested on all jQuery Versions 1.4.3 to 1.6.4, previous versions may work but not as intended.

Change Log

Version 1.3 - New features for multiple ChillBox image sets with different customisations and shadow, images click functions and more.
Version 1.2 - Group function and more custom functions added to rename buttons, closes method, keyboard keys and more.
Version 1.1 - Added customisable functions to change colour of close button and hover colour function added.
Version 1.0 - Original release of ChillBox.

Donate & help towards future developments.

If you are feeling generous, consider a donation. Any and all PayPal donations are much appreciated and help towards improving and the development of newer versions. Many thanks.

PayPal


Contact

For troubleshooting, feature requests, and general help, send me a message by using the enquiry form on my contact page. Make sure to include details on your browser, operating system, ChillBox version, and a link (or relevant code). Alternatively you can email mail me by clicking here.