|
@@ -10,6 +10,8 @@ var $footer = $('#yoho-footer'), |
|
@@ -10,6 +10,8 @@ var $footer = $('#yoho-footer'), |
10
|
$yohoPage = $('.yoho-page'),
|
10
|
$yohoPage = $('.yoho-page'),
|
11
|
$header = $('.yoho-header');
|
11
|
$header = $('.yoho-header');
|
12
|
|
12
|
|
|
|
13
|
+var backToTopHammer;
|
|
|
14
|
+
|
13
|
function cookie(name) {
|
15
|
function cookie(name) {
|
14
|
var cookies = document.cookie,
|
16
|
var cookies = document.cookie,
|
15
|
cookieVal,
|
17
|
cookieVal,
|
|
@@ -158,6 +160,15 @@ function reMarginFooter(fixedElement) { |
|
@@ -158,6 +160,15 @@ function reMarginFooter(fixedElement) { |
158
|
e.srcEvent.preventDefault();
|
160
|
e.srcEvent.preventDefault();
|
159
|
return false;
|
161
|
return false;
|
160
|
});
|
162
|
});
|
|
|
163
|
+
|
|
|
164
|
+ if ($op.find('.back-to-top').length > 0) {
|
|
|
165
|
+ backToTopHammer = new Hammer(document.getElementsByClassName('back-to-top')[0]);
|
|
|
166
|
+ backToTopHammer.on('tap', function(e) {
|
|
|
167
|
+ $(window).scrollTop(0);
|
|
|
168
|
+ return false;
|
|
|
169
|
+ });
|
|
|
170
|
+ }
|
|
|
171
|
+
|
161
|
$footer.removeClass('hide');
|
172
|
$footer.removeClass('hide');
|
162
|
}());
|
173
|
}());
|
163
|
|
174
|
|