Click here to Skip to main content
15,891,867 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Got this code and was wondering if it was possible to make it responsive of all images on the page. So would work on any device with the zoom. The code is an image zoom like you find on Amazon etc. And would like to make all images responsive if possible. Plus have the zoom work if that is doable. Any help is appreciated and thanks in advance.



<!Doctype html>
<html>
    <head>
        
        <title>Demo Example</title>
        <script src="js/jquery-1.6.js"></script>
        <script src="js/jquery.jqzoom-core.js"></script>
        <link href="css/jquery.jqzoom.css" rel="stylesheet" />
        
 </head>
    <body style="">
        <div style="position:relative;top:200px;left:300px;width:600px;">
        <a href="images/bike.jpg" class="minipic" title="Cartoon Bike"><img src="images/bikethumb.jpg" title="Bike"/></a>


         <a href="images/yummy.png"  class="minipic" title="Apple"><img src="images/yummythumb.png" title="apple"/></a>


        <script type="text/javascript">
            $(document).ready(function () {
                $('.minipic').jqzoom({
                    zoomType: 'standard',
                    lens: true,
                    preloadImages: false,
                    alwaysOn: false,
                    zoomHeight: 250,
                    zoomWidth:250
                });

            });
        </script>
        </div>
    </body>
</html>


What I have tried:

Not sure if it is possible or not to make the above code responsive, or not
Posted
Comments
F-ES Sitecore 6-Feb-18 4:35am    
Change

$('.minipic')

to

$('img')

It will probably have bad side effects though.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900