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
16
layout.html
16
layout.html
@ -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(){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user