Lightweight jQuery Magnifying Glass Zoom Plugin Retina Zoomer - Download Lightweight jQuery Magnifying Glass Zoom Plugin - Retina Zoomer

Download Lightweight jQuery Magnifying Glass Zoom Plugin – Retina Zoomer

Posted on

This time I will share jQuery Plugin and tutorial about Lightweight jQuery Magnifying Glass Zoom Plugin – Retina Zoomer, hope it will help you in programming stack.

Lightweight jQuery Magnifying Glass Zoom Plugin Retina Zoomer - Download Lightweight jQuery Magnifying Glass Zoom Plugin - Retina Zoomer
File Size: 130 KB
Views Total: 3908
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Retina Zoomer is a tiny jQuery image zoom plugin which applies a magnifying glass effect to your image when mouse hovers over.

How to use it:

1. Create the basic html structure.

1 <div class="mobile-container">
2   <div class="mobile-page">
3     <div class="page-inner">
4       <div class="retina-zoomer"></div>
5     </div>
6   </div>
7 </div>

2. The primary CSS styles for the Retina Zoomer plugin and add your custom image as a background to the zoom area.

01 .mobile-container {
02   margin: 0 auto;
03   display: block;
04   width: 750px;
05   height: 400px;
06   margin-top: 250px;
07   background-image: url(../images/mobile.png);
08   position: relative;
09 }
10  
11 .mobile-container .mobile-page {
12   width: 499px;
13   height: 283px;
14   position: absolute;
15   top: 50%;
16   left: 50%;
17   margin: -141px 0 0 -249px;
18   cursor: url('../images/blank_google_chrome.cur'), default;
19   background-image: url(../images/webpage.png);
20   background-size: contain;
21   overflow: hidden;
22 }
23  
24 .mobile-container .mobile-page .page-inner {
25   position: relative;
26   display: block;
27   float: left;
28   width: 100%;
29   height: 283px;
30 }
31  
32 .mobile-container .mobile-page .page-inner .retina-zoomer {
33   position: absolute;
34   background-color: red;
35   width: 150px;
36   height: 150px;
37   display: none;
38   border: 2px solid #fff;
39   -moz-box-shadow: 0 0 5px #777, 0 0 10px #aaa inset;
40   -webkit-box-shadow: 0 0 5px #777;
41   box-shadow: 0 0 5px #777, 0 0 10px #aaa inset;
42   -moz-border-radius: 90px;
43   -webkit-border-radius: 90px;
44   border-radius: 90px;
45   background-image: url(../images/webpage.png);
46   background-size: initial;
47   background-repeat: no-repeat;
48 }

3. Load jQuery library and the jQuery Retina Zoomer plugin at the end of the html page.

1 <script src="jquery.min.js"></script>
2 <script src="retina.js"></script>

4. Call the function on the top container.

1 $('.mobile-container').retina();

5. Change the default zoom level.

1 $('.mobile-container').retina({
2   zoomValue: 400
3 });

This awesome jQuery plugin is developed by sahansira. For more Advanced Usages, please check the demo page or visit the official website.

source : jqueryscript.net