1

I have a site at present built using magento and using magic zoom for product images, the plugin works fine for desktop versions and on most responsive designs, however on some screens, most iphone4s, the image takes up the whole top half of the screen and I can't scroll using my finger if I press on the image.

Is there a way to conditionally add CSS and js files based on screen size?

Any help would be appreciated.

Dave Sims
  • 735
  • 1
  • 6
  • 11

1 Answers1

0

I think the easiest way is to put some check if it is mobile in that script.

for example:

if (jQuery(window).width() > 767) {
// here should be the code from magic zoom
}

That means it will show the code from Magic zoom only if window width is bigger then 767

user2331875
  • 134
  • 10