17 August 2011

Tutorial : Jquery Image Hover

Assalammualaikum
jquery image hover nih . image tu akan slow berubah menjadi cerah . haritu ada yang tanya dekat saya pasal tutorial ni . lambat saya buat . hee

1. Dashboard>Design>Edit html>Tick Expand Widget Templates

2. cari code ni : <head>

3. copy code bawah ni :
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js' type='text/javascript'/>
<script type='text/javascript'>
$(document).ready(function(){
$(".post img").fadeTo("slow", 1.0);
$(".post img").hover(function(){
$(this).fadeTo("slow", 0.5);
},function(){
$(this).fadeTo("slow", 1.0);
});
});
</script>
<script type='text/javascript'>
$(document).ready(function(){
$(".latest_img").fadeTo("slow", 1.0);
$(".latest_img").hover(function(){
$(this).fadeTo("slow", 0.5);
},function(){
$(this).fadeTo("slow", 1.0);
});
});
</script>
4. paste selepas/bawah <head> .

5. save

krdt : anis-diyana.blogspot.com