How to install
Just include the following files into the head of your webpage:
<link rel="stylesheet" href="css/chromebox.css"/>
<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/chromebox.min.js"></script>
If you want to implement the iPhone functioinalities include the following code as well
<script type="text/javascript" src="js/chromebox.iphone.js">
Content
Inline
Click me
<a href="#content_div" class="lightbox" style="font-size:30px">Click me</a>
<div id="content_div" style="display:none;">
<ont size="20px">Hello</font><br>
<img src="images/4.jpg" width="350px" alt=""><br>
I'm <b>#content_div</b> and I was hidden. =]<br>
© 2011
</div>
<script>
$(function(){
$('.lightbox').chromebox();
})
</script>
Hello

I'm
#content_div and I was hidden. =]
© 2011
Alert
Alert Message 1
Click me
<a href="#" onclick="return false;" class="chromebox_alert">Click me</a>
<script>
$(function(){
$('.chromebox_alert').click(function(e){
$.chromebox("Do you want to continue?",{
buttons : [ 'Yes', 'No' ]
},function(result){
if (result == 'Yes'){
$.chromebox.close();
}else{
alert('You clicked No');
}
});
})
})
</script>
Alert Message 2
Click me
<a href="#" onclick="return false;" class="chromebox_alert">Click me</a>
<script>
$(function(){
$('.chromebox_alert2').click(function(e){
alert("Hello, I'm simple alert function");
})
})
</script>
Ajax
Ajax Request
Load Ajax File
Broken Link
<a href="/ajax/index.html" style="font-size:25px" class="lightbox">Load Ajax File</a><br>
<a href="ajax/index2.html" style="font-size:25px" class="lightbox ajax">Broken Link</a>
<script>
$(function(){
$('.lightbox').chromebox();
})
</script>
Iframe
Single iframe
Codecanyon.net
Activeden.net
Themeforest.net
<a href="http://www.codecanyon.net" class="lightbox">Codecanyon.net</a><br>
<a href="http://activeden.net" class="lightbox" width="100%" height="550px">Activeden.net</a><br>
<a href="http://www.themeforest.net" class="lightbox" width="50%" height="450px">Themeforest.net</a>
<script>
$(function(){
$('.lightbox').chromebox();
})
</script>