Cara buat gallery dengan efek zoom

Tidak ada komentar
Pasang code di bawah ini di bagian HTML agan

<script src='http://code.jquery.com/jquery-latest.js' type='text/javascript'/>
<script type='text/javascript'>
$(document).ready(function(){
 //Larger thumbnail preview
 $(&quot;ul.thumb li&quot;).hover(function() {
 $(this).css({&#39;z-index&#39; : &#39;1000&#39;});
 $(this).find(&#39;img&#39;).addClass(&quot;hover&quot;).stop()
  .animate({
   marginTop: &#39;-90px&#39;,
   marginLeft: &#39;-90px&#39;,
   top: &#39;50%&#39;,
   left: &#39;50%&#39;,
   width: &#39;174px&#39;,
   height: &#39;174px&#39;,
   padding: &#39;1px&#39;
  }, 200);

 } , function() {
 $(this).css({&#39;z-index&#39; : &#39;0&#39;});
 $(this).find(&#39;img&#39;).removeClass(&quot;hover&quot;).stop()
  .animate({
   marginTop: &#39;0&#39;,
   marginLeft: &#39;0&#39;,
   top: &#39;0&#39;,
   left: &#39;0&#39;,
   width: &#39;100px&#39;,
   height: &#39;100px&#39;,
   padding: &#39;5px&#39;
  }, 400);
});

//Swap Image on Click
 $(&quot;ul.thumb li a&quot;).click(function() {
 
  var mainImage = $(this).attr(&quot;href&quot;); //Find Image Name
  $(&quot;#main_view img&quot;).attr({ src: mainImage });
  return false; 
 });

});
</script>
<style type='text/css'>
body {
 font: Arial, Helvetica, sans-serif normal 10px;
 margin: 0; padding: 0;
}
* {margin: 0; padding: 0;}
img {border: none;}

ul.thumb {
 float: left;
 list-style: none;
 margin: 20; padding: 20px;
 width: 360px;
}
ul.thumb li {
 margin: 0; padding: 5px;
list-style:none;
 float: left;
 position: relative;
 width: 110px;
 height: 110px;
}
ul.thumb li img {
 width: 100px; height: 100px;
 border: 1px solid #ddd;
 padding: 5px;
 background: #f0f0f0;
 position: absolute;
 left: 0; top: 0;
 -ms-interpolation-mode: bicubic;
}
ul.thumb li img.hover {
 background:url(thumb_bg.png) no-repeat center center;
 border: none;
z-index: 1500;
}
#main_view {
 float: left;
 padding: 9px 0;
 margin-left: -10px;
}
</style>
</script>

<ul class="thumb">
<li><a href="http://www.blogger.com/blogger.g?blogID=4090039151590616940#"><img alt="" height="149" src="https://lh6.googleusercontent.com/-au7o0HSDdHw/UBJb-7Ac8zI/AAAAAAAAAMM/IgcB9spgaVg/s200/flange%2520jis%252010k.jpg" width="200" /></a></li>

<li><a href="http://www.blogger.com/blogger.g?blogID=4090039151590616940#"><img alt="" height="149" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvNSyssnGBGxx-1Pgz2shJlDW-RFpJFsRBJrPlJMHyBuAtdazSILcVYprC2P0ePTzbiRcbHQLACB7g-ltAZ2rcxJBqBCMmzqfguYmEwi43QsrSCpDL0acwTDDFAI8C5e5Xo93ZtKaaTQI/s200/flange%2520jis.jpg" width="200" /></a></li>

<li><a href="http://www.blogger.com/blogger.g?blogID=4090039151590616940#"><img alt="" height="126" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNgAjFrNsU4U2UW0v6sDebCqWRtDjX1r9DtvnRNJdSR8HQxeu1a3BgYvawiisKyuxaINDg061dRFNCcGloY0vn6hRc7kf2-0hx1Q56SzH1LqKQ6L9-DohzJuCVJnjg0fTif9FsJndui7g/s200/TEE%2520-%2520NPT.jpg" width="200" /></a></li>

<li><a href="http://www.blogger.com/blogger.g?blogID=4090039151590616940#"><img alt="" height="113" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6fiAYm9AMBKx-Cz4PR7MDCP9fNP5IEGg1vlZUhU8v0cOmcJ-YFS39y962FyY1vecnyiNhVbl0fKKgVvJoSrihGTHg58o0-x7_B3qKRyNUsP6ndGJGKFOTRSxDLi1qnI85VFQgWiXmj6w/s200/union-sw.jpg" width="200" /></a></li>

<li><a href="http://www.blogger.com/blogger.g?blogID=4090039151590616940#"><img alt="" height="150" src="https://lh3.googleusercontent.com/-gDf13GRuwHI/UBpRk4eVXAI/AAAAAAAAAP4/fhuoh8NKE8A/s200/check%2520valve%2520Gala.jpg" width="200" /></a></li>

<li><a href="http://www.blogger.com/blogger.g?blogID=4090039151590616940#"><img alt="" height="185" src="http://a2.sphotos.ak.fbcdn.net/hphotos-ak-ash4/c48.0.403.403/p403x403/311570_308579045907029_978135744_n.jpg" width="200" /></a></li>

<li><a href="http://www.blogger.com/blogger.g?blogID=4090039151590616940#"><img alt="" height="185" src="http://a3.sphotos.ak.fbcdn.net/hphotos-ak-ash4/c48.0.403.403/p403x403/487898_306896396075294_1252828278_n.jpg" width="200" /></a></li>

<li><a href="http://www.blogger.com/blogger.g?blogID=4090039151590616940#"><img alt="" height="185" src="http://a5.sphotos.ak.fbcdn.net/hphotos-ak-ash4/c48.0.403.403/p403x403/311615_306896229408644_195141575_n.jpg" width="200" /></a></li>

<li><a href="http://www.blogger.com/blogger.g?blogID=4090039151590616940#"><img alt="" height="185" src="http://a2.sphotos.ak.fbcdn.net/hphotos-ak-ash3/c48.0.403.403/p403x403/557151_308559289242338_693071216_n.jpg" width="200" /></a></li>

<li><a href="http://www.blogger.com/blogger.g?blogID=4090039151590616940#"><img alt="" src="https://lh6.googleusercontent.com/-nkLv1p9O6v8/UCDNJk67raI/AAAAAAAAAQU/W9LfdTulAu0/s128/bello.jpg" /></a></li>

<li><a href="http://www.blogger.com/blogger.g?blogID=4090039151590616940#"><img alt="" src="https://lh5.googleusercontent.com/-K-i6MJgkfGQ/UCDNKD_wa_I/AAAAAAAAAQg/veqI3etJv6o/s128/strainer-double-lin.jpg" /></a></li>

<li><a href="http://www.blogger.com/blogger.g?blogID=4090039151590616940#"><img alt="" src="https://lh4.googleusercontent.com/-VglX0hLrVFA/UCDNKA3rU-I/AAAAAAAAAQc/N14w03-I8lc/s128/swing%20check%20double%20lin.jpg" /></a></li>

<li><a href="http://www.blogger.com/blogger.g?blogID=4090039151590616940#"><img alt="" src="https://lh5.googleusercontent.com/-OLs4EdXFYYo/UCDNKa0HsgI/AAAAAAAAAQs/1xwvmsXTqJA/s128/tusen%20klep.jpg" /></a></li>

<li><a href="http://www.blogger.com/blogger.g?blogID=4090039151590616940#"><img alt="" src="https://lh3.googleusercontent.com/-MIVFy5Z67XY/UCDLeXntheI/AAAAAAAAAQM/Rn7PQRGWNXk/s128/klep.jpg" /></a></li>

<li><a href="http://www.blogger.com/blogger.g?blogID=4090039151590616940#"><img alt="" src="https://lh3.googleusercontent.com/-iMVFKG5RVNo/UBJM3_phgfI/AAAAAAAAAK4/Ao7Zn1juz5k/s128/pipa%20stainless%20steel%20304.jpg" /></a></li>

<li><a href="http://www.blogger.com/blogger.g?blogID=4090039151590616940#"><img alt="" src="https://lh5.googleusercontent.com/-Zw2j5xhUWQY/UBJMWYlxiuI/AAAAAAAAAKg/zKaRUZrzYzg/s128/Gate-valve.jpg" /></a></li>

<li><a href="http://www.blogger.com/blogger.g?blogID=4090039151590616940#"><img alt="" src="https://lh4.googleusercontent.com/-REO7y9q1CSc/UBJLZd5s5qI/AAAAAAAAAKI/2sBE-dnVxHo/s128/Tee%20A105.jpg" /></a></li>

<li><a href="http://www.blogger.com/blogger.g?blogID=4090039151590616940#"><img alt="" src="https://lh6.googleusercontent.com/-Enyb2TXKlc4/UBJMv3koGvI/AAAAAAAAAKw/HawNI8JOXfg/s128/pipa%20hitam.jpg" /></a></li>
</ul>

Ganti Link tujuan dan link gambar agan
<a href="http://www.blogger.com/blogger.g?blogID=4090039151590616940#">
Link Tujuan Warna Kuning
<img alt="" src="https://lh6.googleusercontent.com/-Enyb2TXKlc4/UBJMv3koGvI/AAAAAAAAAKw/HawNI8JOXfg/s128/pipa%20hitam.jpg" />
Link Gambar Warna Merah

Tidak ada komentar :

Posting Komentar

CHAT ON TV
CHAT NOW TV ONE


» Please download Adobe Flash Player « before watching the streaming