-
Notifications
You must be signed in to change notification settings - Fork 0
/
JQUERY Main.js
25 lines (23 loc) · 954 Bytes
/
JQUERY Main.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
$(document).ready(function(){
$('.target1').click(function(){
$('.navigation ul .target').removeClass('active');
$('.navigation ul .target1').addClass('active');
$('.box1').animate({'left':'35%'},500);
$('.box2').animate({'left':'100%'},500);
$('.box3').animate({'left':'165%'},500);
});
$('.target2').click(function(){
$('.navigation ul .target').removeClass('active');
$('.navigation ul .target2').addClass('active');
$('.box1').animate({'left':'-30%'},500);
$('.box2').animate({'left':'35%'},500);
$('.box3').animate({'left':'100%'},500);
});
$('.target3').click(function(){
$('.navigation ul .target').removeClass('active');
$('.navigation ul .target3').addClass('active');
$('.box1').animate({'left':'-95%'},500);
$('.box2').animate({'left':'-30%'},500);
$('.box3').animate({'left':'35%'},500);
});
});