.


Easy Image Zoom with jQuery





image by: cssglobe.com


The task was to create a script that will allow users to see large details of the product while moving cursor over medium sized image.

This plugin is customizable with several options and simple CSS definitions. In terms of CSS all you need to do is define the newly created image zoom element's size, position and appearance.

This all the code.

<html>
<head>

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>

<script type="text/javascript" src="easyzoom.js"></script>

<script type="text/javascript">
jQuery(function($){
 
 $('a.zoom').easyZoom();

});
</script>

<style type="text/css">
#container{
 padding:10px;
 }
#easy_zoom{
 width:600px;
 height:400px; 
 border:5px solid #eee;
 background:#fff;
 color:#333;
 position:absolute;
 top:60px;
 left:400px;
 overflow:hidden;
 -moz-box-shadow:0 0 10px #777;
 -webkit-box-shadow:0 0 10px #777;
 box-shadow:0 0 10px #777;
 /* vertical and horizontal alignment used for preloader text */
 line-height:400px;
 text-align:center;
 }
</style>
</head>

<body>

<div id="container">
<p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhq-ZfzzpYS2cD4GW1lFBFItoPLJ1IDQVJSLvpU7CSklDTNdmUxKvl_GTUqb6_nWbDjNX0eto-rKsxLCgohvDBkz14syhCzOQN_BoDoP-lzQqvC6fAvpI8GHH_i01Oga7M1fKpaHvAI6G4/s1600/New-York.jpg" class="zoom"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmkG3_xjQt2G-AVE0V-a6AEqXpW4aSHQgtCLnhNdq8QLDDGbHpyz1JSb2Mp9P3IG8MDl9DfUKRNJG9DywTRG8q9S2eGMJEXqjGD952NFhn4jX1yp4EDeaw8Xt-ajLaZf28IcmvGTe-jsU/" alt="New York"></a></p>
<p><em>Roll over the image to view details.</em></p>
</div>

</body>
</html>

source article : jQuery plugin: Easy Image Zoom




Share your views...

0 Respones to "Easy Image Zoom with jQuery"

Post a Comment

 

About Me

© 2010 jQuery World All Rights Reserved Thesis WordPress Theme Converted into Blogger Template by Hack Tutors.info