Commit 26133b3b authored by Leo Iannacone's avatar Leo Iannacone

moved on-click handler on window.on("load") - this prevents from innested...

moved on-click handler on window.on("load") - this prevents from innested handler when call sticky.reset()
parent c4289870
......@@ -213,10 +213,6 @@ function Page_Distrubion(socket)
sticky.update()
sticky.init()
sticky.start()
// onclic - back on top and disable auto-scroll
$("#sticky-view").on("click", function(){
$('html').animate({scrollTop: 0}, 100);
})
},
stop: function() {
$(window).off("scroll")
......@@ -365,6 +361,11 @@ function Page_Distrubion(socket)
__check_hash_makes_sense()
populate()
// Init sticky-view back on top
$("#sticky-view").on("click", function(){
$('html').animate({scrollTop: 0}, 100);
})
// WORKAROUND:
// when page is loaded sidebar has offset().top
// equals 0. This is why html will be loaded on socket
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment