mirror of
https://github.com/flynx/PortableMag.git
synced 2025-12-23 03:51:52 +00:00
another experiment.............
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
fef32f2e59
commit
370929cb97
20
layout.html
20
layout.html
@ -114,24 +114,22 @@ $(document).ready(function(){
|
|||||||
window.touching = false
|
window.touching = false
|
||||||
window.t = 0
|
window.t = 0
|
||||||
|
|
||||||
function monitor_scroll(){
|
setInterval(function(){
|
||||||
clearTimeout(window.t)
|
if(!touching && scrolling){
|
||||||
window.t = setTimeout(function(){
|
v.trigger('scrollend')
|
||||||
//if(!window.touching){
|
}
|
||||||
v.trigger('scrollend')
|
scrolling = false
|
||||||
//}
|
}, TIMEOUT)
|
||||||
}, TIMEOUT)
|
|
||||||
}
|
|
||||||
|
|
||||||
$('.viewer')
|
$('.viewer')
|
||||||
.on('scroll', function(evt){
|
.on('scroll', function(evt){
|
||||||
monitor_scroll()
|
scrolling = true
|
||||||
})
|
})
|
||||||
.on('touchstart mousedown', function(evt){
|
.on('touchstart mousedown', function(evt){
|
||||||
window.touching = true
|
touching = true
|
||||||
})
|
})
|
||||||
.on('touchend mouseup', function(evt){
|
.on('touchend mouseup', function(evt){
|
||||||
window.touching = false
|
touching = false
|
||||||
})
|
})
|
||||||
|
|
||||||
.on('scrollend', function(){
|
.on('scrollend', function(){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user