-
Notifications
You must be signed in to change notification settings - Fork 0
/
blogger.js
52 lines (46 loc) · 1.34 KB
/
blogger.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
$(document).ready(function(){
//first post
$('#test1').click(function(){
$('#test11').hide().css('background-color','green').slideToggle('slow');
});
//animate post
$("#test22").click(function(){
$("#test222").animate({"left": "+=50px"}, "slow");
});
$("#test2").click(function(){
$("#test222").animate({"left": "-=50px"}, "slow");
});
//table editing
$('#test3').css('border','1px solid black');
$('#test3 td').css('border','1px solid black');
$('#test3 tr').filter(':even').css('background-color','green');
$('#test33').click(function(){
$('#test3 tr').filter(':even').animate({opacity:'toggle'},'slow');
});
$('#test333').click(function(){
$('#test3 td:contains(More)').css('background-color','red');
});
//more less function
$('.selector p:eq(1)').hide();
$('a.less').hide();
$('a.more').click(function(){
$('.selector p:eq(1)').slideDown('slow');
$('a.more').hide();
$('a.less').fadeIn('slow');
return false;
});
$('a.less').click(function(){
$('.selector p:eq(1)').slideUp('slow');
$('a.less').hide();
$('a.more').fadeIn('slow');
return false;
});
//post5
$('#post5').toggle(function(){
$('#post5 div').animate({'width':'400px'},'slow').text('click to squeeze!');
},
function(){
$('#post5 div').animate({'width':'200px'},'slow').text('click to make large!');
}
);
});//end of main parentheses