Comments (5)
Can you provide more details or example what you trying to accomplish? Because Event methods api is exactly supposed to be the place where is possible to add some custom code
from xzoom.
To be precise, I would like to create a tooltip like notification to inform users that they can scroll on the image to zoom in or out. That would be instance.eventopen
method but I don't wish to override the default behavior.
from xzoom.
Can you try to use this approach and let me know if this will work for you or not?
var xzoom = $('.xzoom, .xzoom-gallery').xzoom(); //don't forget to add your options
// Or
// var xzoom = $('.xzoom').xzoom();
xzoom.eventclick = function(element) {
//Remove next line and put your custom code here that will run on every zoom open event
console.log('Zoom Opened');
element.xon('click', function(event) {
$('.xzoom:first').trigger('click');
});
}
xzoom.eventleave = function(element) {
element.xon('mouseleave', function() {
//Remove next line and put your custom code here that will run on every zoom close event
console.log('Zoom Closed');
xzoom.closezoom();
});
}
from xzoom.
Yes. it does work as I wanted but with a lot of code than necessary. It would be great if you could create events that would fire on certain actions.
Thanks for this.
from xzoom.
Yeah you right. I'll add more easy way to implement custom functions on events in future releases.
You welcome.
from xzoom.
Related Issues (20)
- While i'm click the first time small preview it the there is that possible to hide this in mobile devices. HOT 3
- xZoom Lens is not adjusting in small size of image HOT 9
- xZoom lens in mobile HOT 5
- how can I make the zoom result image bigger than the container HOT 2
- rootOutput HOT 2
- Capturing current zoom scale HOT 1
- Page Not Scrolling HOT 1
- Module build failed: ModuleNotFoundError: Module not found: Error: Can't resolve '../images/xloading.gif' in 'C:\Users\fhsna\Projetos de software\lojafinal\loja\node_modules\xzoom\dist' HOT 3
- Add xzoom event on dynamic images HOT 2
- Is it possible to use it with Vue.js? HOT 10
- php laravel HOT 2
- Thumbnail image click not working HOT 1
- Lens is not working - overlapping lens frame on hover HOT 1
- Question - xzoom container size adjustability HOT 1
- i made the thumbnail in left side of the image like amazon but its throwing error in js HOT 2
- Zoom aspect ratio changes when adding image of the same size as of the demo car images HOT 2
- Either cursor is not working or Popup image window position is not right HOT 2
- Perfect plugin ,Why no arrows button HOT 1
- how can use in gulpjs file HOT 1
- Not working over modal HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xzoom.