mirror of
https://github.com/dawidolko/Website-Templates.git
synced 2026-03-22 09:12:19 +00:00
Website templates
This commit is contained in:
17
mobile-app-landing-page-html5-template/js/customscripts.js
Normal file
17
mobile-app-landing-page-html5-template/js/customscripts.js
Normal file
@@ -0,0 +1,17 @@
|
||||
$(function() {
|
||||
$('a[href*=#]:not([href=#])').click(function() {
|
||||
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
|
||||
|| location.hostname == this.hostname) {
|
||||
|
||||
var thisItem = $(this.hash);
|
||||
thisItem = thisItem.length ? thisItem : $('[name=' + this.hash.slice(1) +']');
|
||||
if (thisItem.length) {
|
||||
$('html,body').animate({
|
||||
scrollTop: thisItem.offset().top
|
||||
}, 1000);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user