payalord / xZoom

jQuery Zoom Gallery plugin
https://payalord.github.io/xZoom/
Apache License 2.0
165 stars 65 forks source link

xzoom is not a function #37

Closed aneeskodappana closed 3 years ago

aneeskodappana commented 6 years ago

when i import this plugin into an angular project using the following syntax

import 'xzoom';

the console showing xzoom is not a function.

any idea to use xzoom in an angular project. Is this plugin ok to use with webpack?

Thank you

payalord commented 6 years ago

xZoom is jQuery plugin. And not ready out of the box to be imported in projects by webpack. But you can try to use one of the suggested approach to first get jQuery into your globals, and then same way load xZoom: https://stackoverflow.com/questions/28969861/managing-jquery-plugin-dependency-in-webpack

payalord commented 6 years ago

Anyway this is good question, I'll try to make working example later in https://github.com/payalord/xzoom-sandbox

payalord commented 3 years ago

please use require instead of import after you properly loaded jQuery, this must fix import problem.