Kode CSS
#komentar {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 100;
background: #555 url(http://link-gambar-background.png);
display: none;
}
.msgkotak {
background: #fff;
position: fixed;
width: 555px;
height: 300px;
border: 5px solid #222;
top: 25%;
left: 25%;
}
.tutup {
top: 0px;
float: right;
margin-right: 10px;
}
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 100;
background: #555 url(http://link-gambar-background.png);
display: none;
}
.msgkotak {
background: #fff;
position: fixed;
width: 555px;
height: 300px;
border: 5px solid #222;
top: 25%;
left: 25%;
}
.tutup {
top: 0px;
float: right;
margin-right: 10px;
}
Script jQuery Plugin
<script type='text/javascript'>
//<![CDATA[
$(document).ready(function(){
//Adjust height of overlay to fill screen when page loads
$("#komentar").css("height", $(document).height());
//When the link that triggers the message is clicked fade in overlay/msgkotak
$(".alert").click(function(){
$("#komentar").fadeIn();
return false;
});
//When the message box is closed, fade out
$(".tutup").click(function(){
$("#komentar").fadeOut();
return false;
});
});
//Adjust height of overlay to fill screen when browser gets resized
$(window).bind("resize", function(){
$("#komentar").css("height", $(window).height());
});
//]]>
</script>
Letakin diatas tag </body> script tersebut.//<![CDATA[
$(document).ready(function(){
//Adjust height of overlay to fill screen when page loads
$("#komentar").css("height", $(document).height());
//When the link that triggers the message is clicked fade in overlay/msgkotak
$(".alert").click(function(){
$("#komentar").fadeIn();
return false;
});
//When the message box is closed, fade out
$(".tutup").click(function(){
$("#komentar").fadeOut();
return false;
});
});
//Adjust height of overlay to fill screen when browser gets resized
$(window).bind("resize", function(){
$("#komentar").css("height", $(window).height());
});
//]]>
</script>
Kode HTML
Centang lalu cari kode iframe buat komentar, dan biasanya seperti ini<iframe allowtransparency='true' class='blogger-iframe-colorize blogger-comment-from-post' frameborder='0' height='410' id='comment-editor' name='comment-editor' src='' width='100%'/>
Ganti dengan kode berikut menjadiGantilah tulisan Comment here dengan image jika suka. SAVE and good luck your comment now have like lightbox b-)<div id='komentar'>
<div class='msgkotak'>
<a class='tutup' href='#'><img src='http://link-gambar-close.jpg'/></a>
<iframe allowtransparency='true' class='blogger-iframe-colorize blogger-comment-from-post' frameborder='0' height='300' id='comment-editor' name='comment-editor' src='' width='100%'/>
</div>
</div>
<div id='content'><a class='alert' href='#'>Comment here</a></div>
Tidak ada komentar:
Posting Komentar