jackmoore / zoom

jQuery plugin for zooming images on mouseover.
http://www.jacklmoore.com/zoom/
MIT License
1.54k stars 459 forks source link

Trouble in initializing zoom in Vue #136

Open yoshikev opened 6 years ago

yoshikev commented 6 years ago

Hi,

I tried to import jqyuery zoom into my vue project. it prompt this error when i try to initalized the zoom : TypeError: $(...)._ready is not a function

Please help me to find out if it works well with vue. Thank you

yoshikev commented 6 years ago

screen shot 2018-06-20 at 1 38 21 am

Sorry i forgot to attached

jackmoore commented 6 years ago

Sorry, I don't know much about Vue. The _ready method is new to me, the underscore probably indicates it's a private method, not something that zoom would have intentionally called.

I would check that the $ aliases the same object that the required script is referencing for jQuery, but that's probably not the issue because that error would be something like $(...).zoom is not a function.

yoshikev commented 6 years ago

when i remove the _ready() function, TypeError: $(...).zoom is not a function error is out.

jackmoore commented 6 years ago

Sound like when the zoom package was required it did not extend the same jQuery object that you are referencing when you type $('.zoom'). Try replacing the $ alias with jQuery first, and if that doesn't work, you'll probably have to have a look at the file you are requiring to see how it's referencing jQuery.

yoshikev commented 6 years ago

Thank you. Will try it and update u if i manage to get it.