Revision 0835eb8c cloudcms/static/cloudcms/js/common.js
b/cloudcms/static/cloudcms/js/common.js | ||
---|---|---|
21 | 21 |
|
22 | 22 |
$('.show-extra').click(function(e) { |
23 | 23 |
e.preventDefault(); |
24 |
|
|
25 |
$(this).parents('.bg-wrap').find('.extra').toggle('slow'); |
|
26 |
$('.hide-extra').toggle(); |
|
24 |
$(this).parents('.bg-wrap').find('.extra').slideToggle(600); |
|
27 | 25 |
}); |
28 | 26 |
$('.hide-extra').click(function(e) { |
29 | 27 |
e.preventDefault(); |
30 |
$(this).hide(); |
|
31 |
$(this).parents('.bg-wrap').find('.extra').hide('slow'); |
|
28 |
$(this).parents('.bg-wrap').find('.extra').slideUp(600); |
|
32 | 29 |
}); |
33 | 30 |
|
34 | 31 |
$('.box-more p').click(function(e) { |
... | ... | |
68 | 65 |
|
69 | 66 |
$('.top-msg .success').parents('.top-msg').css( |
70 | 67 |
{ |
71 |
backgroundColor: '#00A2B1',
|
|
68 |
backgroundColor: '#77C596',
|
|
72 | 69 |
color: '#fff' |
73 | 70 |
} |
74 |
) |
|
71 |
);
|
|
75 | 72 |
|
76 | 73 |
$('.top-msg .error').parents('.top-msg').css( |
77 | 74 |
{ |
78 |
backgroundColor: '#C43F73',
|
|
75 |
backgroundColor: '#EF4F54',
|
|
79 | 76 |
color: '#fff' |
80 | 77 |
} |
81 |
) |
|
78 |
);
|
|
82 | 79 |
|
83 | 80 |
|
84 | 81 |
$('.top-msg .warning').parents('.top-msg').css( |
85 | 82 |
{ |
86 |
backgroundColor: '#F0A216',
|
|
83 |
backgroundColor: '#F6921E',
|
|
87 | 84 |
color: '#fff' |
88 | 85 |
} |
89 |
) |
|
86 |
);
|
|
90 | 87 |
|
91 | 88 |
$('.top-msg .info').parents('.top-msg').css( |
92 | 89 |
{ |
93 |
backgroundColor: '#75A23A',
|
|
90 |
backgroundColor: '#C3C3B9',
|
|
94 | 91 |
color: '#fff' |
95 | 92 |
} |
96 |
) |
|
93 |
);
|
|
97 | 94 |
|
95 |
// clouds homepage animation |
|
98 | 96 |
$('#animation a').hover( |
99 | 97 |
function () { |
98 |
|
|
100 | 99 |
$(this).animate({ |
101 |
top: '+=-10' |
|
100 |
top: '+=-10' |
|
101 |
}, 600, function() { |
|
102 |
if ($(this).find('img').attr('src').indexOf("_top") == -1) { |
|
103 |
var src = $(this).find('img').attr('src').replace('.png', '_top.png') |
|
104 |
$(this).find('img').attr("src", src); |
|
105 |
} |
|
106 |
|
|
107 |
}); |
|
108 |
$(this).siblings('p').find('img').animate({ |
|
109 |
width: '60%' |
|
102 | 110 |
}); |
111 |
}, |
|
112 |
function () { |
|
113 |
|
|
114 |
$(this).animate({top: '0'}, 600, function() { |
|
115 |
var src = $(this).find('img').attr('src').replace('_top.png', '.png') |
|
116 |
$(this).find('img').attr("src", src); |
|
117 |
}); |
|
118 |
$(this).siblings('p').find('img').animate({ |
|
119 |
width: '65%' |
|
120 |
}); |
|
121 |
} |
|
122 |
); |
|
123 |
|
|
124 |
|
|
125 |
/*$('#animation a').hover( |
|
126 |
function () { |
|
127 |
var src = $(this).find('img').attr('src').replace('.png', '_top.png') |
|
128 |
$(this).find('img').attr("src", src); |
|
129 |
$(this).animate({ |
|
130 |
top: '+=-10' |
|
131 |
}, 600, function() { |
|
132 |
// action to do when animation is finished |
|
133 |
}); |
|
103 | 134 |
$(this).siblings('p').find('img').animate({ |
104 | 135 |
width: '60%' |
105 | 136 |
}); |
106 | 137 |
}, |
107 | 138 |
function () { |
139 |
|
|
108 | 140 |
$(this).animate({ |
109 | 141 |
top: '0' |
110 | 142 |
|
111 |
}); |
|
143 |
}, 600, function() { |
|
144 |
var src = $(this).find('img').attr('src').replace('_top.png', '.png') |
|
145 |
$(this).find('img').attr("src", src); |
|
146 |
}); |
|
112 | 147 |
$(this).siblings('p').find('img').animate({ |
113 | 148 |
width: '65%' |
114 | 149 |
}); |
115 | 150 |
} |
116 |
); |
|
151 |
);*/
|
|
117 | 152 |
|
118 | 153 |
|
119 | 154 |
}); |
Also available in: Unified diff