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.

4

1 回答 1

0

我认为最简单的方法是检查它是否可以在该脚本中移动。

例如:

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

这意味着只有当窗口宽度大于 767 时才会显示来自 Magic zoom 的代码

于 2013-11-24T20:13:10.203 回答