Closed joaodelfino closed 9 years ago
Do you mean that everything inside the scrollable window is a link and you only want to click it if you haven't moved the mouse while the button is down?
Yes, that about it. Each square is a different link and the squares occupy all the scrollable window. Em 21/04/2015 06:47, "Dave Taylor" notifications@github.com escreveu:
Do you mean that everything inside the scrollable window is a link and you only want to click it if you haven't moved the mouse while the button is down?
— Reply to this email directly or view it on GitHub https://github.com/davetayls/jquery.kinetic/issues/80#issuecomment-94646835 .
And yes, you're right, I only want those links to be clickable when I haven't move the mouse while the button is down. Em 21/04/2015 06:47, "Dave Taylor" notifications@github.com escreveu:
Do you mean that everything inside the scrollable window is a link and you only want to click it if you haven't moved the mouse while the button is down?
— Reply to this email directly or view it on GitHub https://github.com/davetayls/jquery.kinetic/issues/80#issuecomment-94646835 .
Ok, I would probably use filter target to prevent the click but capture the current element. Then use stopped to check how far it has moved, if it has moved over a particular distance trigger a click on the element captured
Thanks.
@davetayls can you provide a code snippet for your previous statement. I'm having a hard time disabling links while moving, the moment I release the button and stop moving, it opens a link.
@davetayls can you provide a code snippet for your previous statement. I'm having a hard time disabling links while moving, the moment I release the button and stop moving, it opens a link.
I found a workaround if someone needs it:
moved: function() {
$('.wp-my-instagram a').bind('click', function(e){
e.preventDefault();
});
},
stopped: function() {
setTimeout(function(){
$('.wp-my-instagram a').unbind('click'); },
100);
}
});
Hi, I have a grid of links over my wrapper. When I move the image this grid moves also, but it also triggers the click for the links... Is there any way to avoid it ? I've tried the filterTarget but withou success. ( take a look at the screenshot, white squares are the links ). Thanks a lot !