|
Lines 1-4
Link Here
|
| 1 |
/* global enquire readCookie updateBasket delCookie */ |
1 |
/* global enquire readCookie updateBasket delCookie __ */ |
| 2 |
(function( w ){ |
2 |
(function( w ){ |
| 3 |
// if the class is already set, the font has already been loaded |
3 |
// if the class is already set, the font has already been loaded |
| 4 |
if( w.document.documentElement.className.indexOf( "fonts-loaded" ) > -1 ){ |
4 |
if( w.document.documentElement.className.indexOf( "fonts-loaded" ) > -1 ){ |
|
Lines 231-234
$(document).ready(function(){
Link Here
|
| 231 |
}); |
231 |
}); |
| 232 |
|
232 |
|
| 233 |
$('[data-toggle="tooltip"]').tooltip(); |
233 |
$('[data-toggle="tooltip"]').tooltip(); |
|
|
234 |
|
| 235 |
/* Scroll back to top button */ |
| 236 |
$("body").append('<button id="backtotop" class="btn btn-primary" aria-label="' + __("Back to top") + '"><i class="fa fa-arrow-up" aria-hidden="true" title="' + __("Scroll to the top of the page") + '"></i></button>'); |
| 237 |
$("#backtotop").hide(); |
| 238 |
$(window).on("scroll", function(){ |
| 239 |
if ( $(window).scrollTop() < 300 ) { |
| 240 |
$("#backtotop").fadeOut(); |
| 241 |
} else { |
| 242 |
$("#backtotop").fadeIn(); |
| 243 |
} |
| 244 |
}); |
| 245 |
$("#backtotop").on("click", function(e) { |
| 246 |
e.preventDefault(); |
| 247 |
$("html,body").animate({scrollTop: 0}, "slow"); |
| 248 |
}); |
| 234 |
}); |
249 |
}); |
| 235 |
- |
|
|