posted by DingGGu DingGGu 2011/03/23 18:06

Sliding With jQuery

The jQuery is fairly simple really. Let’s take a look at it:

01 jQuery(function($) {
02     flag = true;
03     $('#button').click(function() {
04         if(flag == true) {
05             $('#header').stop(true, true).animate({height: '213px'}, 600, function() {
06                 flag = false;
07             });
08         } else {
09             $('#header').stop(true, true).animate({height: '594px'}, 600, function() {
10                 flag = true;
11             });
12         }
13     });
14 });
크리에이티브 커먼즈 라이선스
Creative Commons License

'HTML/CSS > HTML' 카테고리의 다른 글

JQUERY TOGLE  (0) 2011/03/23
아파치 AutoIndex Indexes 꾸미기  (0) 2010/11/11
검색엔진 robots.txt로 차단하기  (0) 2010/11/11
TAG