Setup:
I have a website that is hosted locally on a Desktop Computer, I have a touchscreen hooked up to that Desktop. The website is viewed on the touchscreen using Firefox.
Requirements:
Questions:
Thanks very much.
Setup:
I have a website that is hosted locally on a Desktop Computer, I have a touchscreen hooked up to that Desktop. The website is viewed on the touchscreen using Firefox.
Requirements:
Questions:
Thanks very much.
touch
events work (my money is on yes), navigate to this iScroll demo page on your device. More on iScroll 4 here.
– couzzi
Commented
Mar 19, 2013 at 23:11
Ill let you work out the nuances, but something like this gives you an idea
$(function(){
var dragYStart;
var dragScrollStart;
$(window).one('mousedown',startDrag);
function startDrag(e){
dragYStart = e.pageY;
dragScrollStart = $(window).scrollTop();
$(window).on('mousemove',drag);
$(window).one('mouseup',stopDrag);
}
function stopDrag(e){
$(window).off('mousemove',drag);
$(window).one('mousedown',startDrag);
}
function drag(e){
var delta = dragYStart - e.pageY;
$(window).scrollTop(dragScrollStart + delta);
}
});
see example
UPDATE... found this this morning. this is probably exactly what you want
http://zynga.github./scroller/
https://github./cubiq/iscroll [archived/read-only] https://web.archive/web/20170515081250/http://iscrolljs./ https://web.archive/web/20180726185738/http://lab.cubiq/iscroll/examples/simple/
For iOS-style scrolling on touch-aware devices (works great on desktop, too) iScroll is a great solution.
Point the touch-device in question to this demo url : http://lab.cubiq/iscroll/examples/simple/
Features Include:
-Via the iScroll 4 docs
use "mine" js plugin I also have swipe event handler :D http://hoangminhdat./myLab/dragScrollJS/
It doesn't work on handheld device, but work great on desktop, it's also very simple
I made it :D