davetayls / jquery.kinetic

Add kinetic scrolling functionality to a container using mouse or touch devices
http://davetayls.me/jquery.kinetic
MIT License
420 stars 86 forks source link

Click events. #68

Closed paweu92 closed 9 years ago

paweu92 commented 10 years ago

Hi,

On touch devices doesn't work click actions on divs. Do you have any solution?

Regards

skovhus commented 10 years ago

Example code? And specific device?

paweu92 commented 10 years ago

http://ujeb.se/ZnUb

If you click on pin, information from the left shoud change.

I'm testing on multitouch screen connected with computer, nexus 7, iphone

davetayls commented 10 years ago

it doesn't look like you have implemented filtering - https://github.com/davetayls/jquery.kinetic#filtering-clickable-elements

hosembafer commented 9 years ago

I have this problem too, thank's for link @davetayls, it's solved this mistake.

laciev commented 9 years ago

Hi there! I am new at JS (and so confused by it!). I don't know where to paste the code to implement filtering. Kinetic is working in my page and its great, but my links don't work. is there a certain area of the JS file to include this element? Can someone guide me here?

hosembafer commented 9 years ago

Try this.

$("#content").kinetic({
    cursor: "auto",
    filterTarget: function(target, e) {
        if(!/down|start/.test(e.type))
        {
            return !(/a|img/i.test(target.tagName));
        }
    }
});
laciev commented 9 years ago

Thanks but I'm not sure where to use it.. Is there any particular place in the js file that it should be?

hosembafer commented 9 years ago

I can't explain it here, you need to forum (stackoverflow.com), or send me a message.

psrafo@gmail.com - it's my hangouts, you can message me and I help you.