Kinetic Pulse
  • Home
  • Services
  • Portfolio
  • Blog
  • Terms
  • Contact

Magic Zoom on responsive websites

February 20, 2014

I love Magic Zoom – the ideal tool for letting your customers zoom into the details on your product images.
Its relatively inexpensive and easy to integrate into most ecommerce platforms.
http://www.magictoolbox.com/magiczoom/

I had installed recently with great success on www.handprintedgifts.com – which is a responsive online shopping site built with ZenCart.
However the client noticed that the Magic Zoom was behaving oddly on mobile devices (ie the zoomed in image was appearing off screen and couldn’t be seen)
So they asked to turn this off on mobile devices.

Even though the documenattion for Magic Zoom was extensive I couldn’t see any direct good /evil switch to make this behave properly in responsive sites. So I added the following block of javascript to the bottom of the product page to turn of MagicZoom when the screen width is lower than my responsive breakpoint:

//new code 20-02-14 to check if mobile & turn off magiczoom
var ww = document.body.clientWidth;
if (ww < 750) {
  //mobile only
  MagicZoom.options = {
     'disable-zoom': true
   };
 }

Note how this is not included within a jQuery ready or onload event.
You might also want to add the following to your css so that the "Move your mouse over to zoom" message it hidden in mobile devices

/* Mobile Grid and Overrides ---------------------- */
@media only screen and (max-width: 767px) {
   .MagicToolboxMessage{display:none};
}

Share

Facebook Google+ Twitter Pinterest Email
  1. Joe Carey says

    April 18, 2014 at 4:10 pm

    Works perfectly! Thank you for a quick easy fix to this problem.

Back to Blog

Testimonials

I like it.  I like it a lot !!!

 You have interpreted what I wanted to achieve perfectly considering what you have to play with i.e not redoing the whole thing in the process.

Fiona Simmons-MooreSouth Gloucestershire Parents & Carers
Absolutely fantastically professional web developer – I would highly recommend!!! Thank you so much Kinetic Pulse!
Tania MarstonDoris Designs
Amazing and brilliant, Kinetic Pulse have lifted a dream to reality, Highly recommended and great if you are total novice, they know their stuff…Thanks again
Annie LindridgeSalt Yourself Out
Thank you for all of your hard work its looks fab and I am over the moon with it!
Amanda MercerAmanda Mercer Ceramics
It’s been fab working with you – we love the site and certainly going to recommend you!
James DaviesThirty Eight Degrees North
Thank you guys so much for all that you’ve done helping us to create a really awesome website!! We get such great feedback – everyone loves it & we couldn’t be prouder! Look forward to working with you again soon!
Wild Thyme PlantsWild Thyme Plants
Thanks so much for all your work on this, really appreciated. It’s come on in leaps and bounds since you took over.
Pete KewRedwood Strip Curtains

Copyright 2025 Kinetic Pulse