// Adding a button to top
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10857 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
+17
@@ -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();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user