-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
34 lines (31 loc) · 880 Bytes
/
script.js
File metadata and controls
34 lines (31 loc) · 880 Bytes
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
slide = 0;
WIDTH = $("#holder article").width();
function changeSlide(s){
document.getElementById("holder").style.marginLeft = "-"+(s*WIDTH)+"px";
}
function plusSlide(){
slide++;
if(slide==4)slide=0;
changeSlide(slide);
}
function minusSlide(){
slide--;
if(slide==-1)slide=3;
changeSlide(slide);
}
o = $("#cl-effect-2").offset().top;
document.onscroll = function(){
if($("body").scrollTop() >= o){
$("#cl-effect-2").css("position","fixed");
$("#cl-effect-2").css("top","0");
$("#cl-effect-2").css("margin-top","0");
$("#cl-effect-2").css("z-index","999999999");
$("#cl-effect-2").css("box-shadow","0 0 5px rgba(0,0,0,0.3)");
}else{
$("#cl-effect-2").css("position","static");
$("#cl-effect-2").css("top","auto");
$("#cl-effect-2").css("margin-top","10px");
$("#cl-effect-2").css("z-index","auto");
$("#cl-effect-2").css("box-shadow","none");
}
}