-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
39 lines (28 loc) · 1.29 KB
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// -------------------------------------------------navbar-----------------------------
$(window).scroll(function () {
$('nav').toggleClass('scrolled', $(this).scrollTop() > 50);
});
// -------------------------------------------------navbar-----------------------------
// ----------------------------------------up btn --------------------------------------------------------
$(window).scroll(function () {
$('a').toggleClass('scrollh', $(this).scrollTop() > 50);
});
$(".demoupbtn").click(function(){
$("body,html").animate({scrollTop:'0'},1000)
})
// --------------------------------------------------up btn --------------------------------------------------------
$("a[href^='#']").click(function(e) {
let ax = $(e.target).attr("href");
let ay = $(ax).offset().top;
$("body,html").animate({scrollTop:ay},1000)
})
$('body').scrollspy({target: '.navbar-fixed-top'})
// ---------------------------------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------------------------------
$(document).ready(function(){
$("#store-container").fadeOut(3000,function(){
$("#loading").fadeOut(500,function(){
$("#loading").remove()
})
})
})