another experiment.............

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-02-13 01:15:58 +04:00
parent fef32f2e59
commit 370929cb97

View File

@ -114,24 +114,22 @@ $(document).ready(function(){
window.touching = false
window.t = 0
function monitor_scroll(){
clearTimeout(window.t)
window.t = setTimeout(function(){
//if(!window.touching){
setInterval(function(){
if(!touching && scrolling){
v.trigger('scrollend')
//}
}, TIMEOUT)
}
scrolling = false
}, TIMEOUT)
$('.viewer')
.on('scroll', function(evt){
monitor_scroll()
scrolling = true
})
.on('touchstart mousedown', function(evt){
window.touching = true
touching = true
})
.on('touchend mouseup', function(evt){
window.touching = false
touching = false
})
.on('scrollend', function(){