What's this
This plugin allows to do better swipe/""drag"" actions, you can set the specific directions to the items and who is their container, compatible with all browsers and devices.
Options
Default use
(function(){
$("#left").customSwipe();
$("#right").customSwipe({
directions : {
right : true
}
});
$("#top").customSwipe({
directions : {
up : true
}
});
$("#bottom").customSwipe({
directions : {
down : true
}
});
$("#omni1").customSwipe({
directions : {
left : true,
up : true
}
});
$("#omni2").customSwipe({
directions : {
left : true,
right : true
}
});
$("#omni3").customSwipe({
directions : {
left : true,
down : true,
right : true,
up : true
}
});
$("#gradient-left").customSwipe({
directions : {
gradient : true
}
});
})();
With callback
(function(){
$("#special:not(.off)").customSwipe({
directions : {
left : function(){
alert ("Direction callback");
$(this).addClass("off");
}
}
},
function(){
alert ("General callback");
});
})();
Move to left
Move to right
Move up
Move down
Move to left (with callback)
Move to left, up
Move to left, right
Move to left, right, up, down
Transparent Gradient