I’m making a mobile web app and am trying to make a star rating system that resambles the one in itunes where you can swipe over the stars and lift you finger on the star you want to choose. I’m using jQuery mobile. Using the swipe event doesn’t seem to do the trick, while it stops the web page to stick to your finger (you can swipe around the area you attach the event to without the page itself moves) it is intended for either “swipe left” or “swipe right”. Not “swipe away as you want”.
Is there a suitable event i can use that also enables me to get the coordinates of the finger position?
Example code:
$("#mapPage").live("pageinit", function () {
$('div.stars').swipe(function() {
console.log("swiped");
});
});
Example 2:
$('div.stars').scrollstart(function(event) {
event.preventDefault();
// stuf in here only triggers in scroll start
// but i want i to trigger as the finger position gets updated
});
I figured it out. This is the code i used: