-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathsl.js
67 lines (52 loc) · 1.17 KB
/
sl.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
$(function(){
$('#scroll,#scroll1,#scroll2').on('click',function(){
$('html,body').animate({
scrollTop:$($(this).attr('href')).offset().top - 1
},800);
});
});
window.onscroll = function() {scrol()};
function scrol() {
if (document.documentElement.scrollTop > 10) {
document.getElementById("tifer").style.display = "block";
} else {
document.getElementById("tifer").style.display = "none";
}
}
function tiger() {
document.documentElement.scrollTop = 0;
}
var t=1;
p(t);
function s(n)
{ p(t+=n);
}
function c(n)
{
p(t=n);
}
function p(n)
{
var r=document.getElementsByClassName("mySlides");
var dots=document.getElementsByClassName("dot")
if(n>r.length)
{t=1;}
if(n<1)
{t=r.length;}
var i;
for(i=0;i<r.length;i++)
{
r[i].style.display="none";}
for (i = 0; i < dots.length; i++) {
dots[i].className = dots[i].className.replace(" active", "");
}
r[t-1].style.display ="block";
dots[t-1].className += " active";
}
setInterval(P,200);
function open(){
document.getElementsByClassName("container").display="block";
}
function fun(){
document.getElementsByClassName("container").display="none";
}