// Adding a button to top

This commit is contained in:
lLefevre
2011-12-02 14:31:08 +00:00
parent db1d5aba12
commit a236b63008
7 changed files with 35 additions and 10 deletions
+17
View File
@@ -1000,4 +1000,21 @@ $(document).ready(function(){
if(!isArrowKey(e))
return copyMeta2friendlyURL()
});
// Adding a button to top
var scroll = $('#scrollTop a');
var view = $(window);
scroll.click(function(){
$.scrollTo('#top_container', 1200, { offset: -100 });
});
view.bind("scroll", function(e) {
var heightView = view.height();
var btnPlace = scroll.offset().top;
if (heightView < btnPlace)
scroll.show();
else
scroll.hide();
});
});