toggle 은 한가지가 아니다; 

하나는 Effects>Basics  , 다른 하나는 Events > Mouse Events 이다.

Effects 쪽은 대상 엘리먼츠를 숨기거나 보여주는 역할이고

  • .toggle( [duration] [, callback] )

    durationA string or number determining how long the animation will run.

    callbackA function to call once the animation is complete.

  • version added: 1.4.3.toggle( [duration] [, easing] [, callback] )

    durationA string or number determining how long the animation will run.

    easingA string indicating which easing function to use for the transition.

    callbackA function to call once the animation is complete.

  • version added: 1.3.toggle( showOrHide )

    showOrHideA Boolean indicating whether to show or hide the elements.


Events 쪽은 두개 이상의 행들러를 대상에 바인드하는 역할을한다. ( 다른유형의 클릭에 실행되도록...)
    즉.. 이건 홀수,짝수의 동작에 반응하는거였다; 뭐 마지막 옵션에 해당하는 함수를 하나 더 넣으면 매번도 되는듯 하다.


  • version added: 1.0
    .toggle( handler(eventObject), handler(eventObject) [, handler(eventObject)] )

    handler(eventObject)A function to execute every even time the element is clicked.

    handler(eventObject)A function to execute every odd time the element is clicked.

    handler(eventObject)Additional handlers to cycle through after clicks.


'IT > jquery' 카테고리의 다른 글

$ 초기화...  (0) 2012.01.04
http://www.okjsp.pe.kr/seq/181480

이미 $를 Prototype같은 라이브러리가 사용하고 있어서 그렇습니다. 

아래처럼 사용하시면 됩니다. 내용 부분에서는 $ 사용가능합니다. 
jQuery.noConflict(); 
jQuery(document).ready(function($){ 
// 내용 
});

'IT > jquery' 카테고리의 다른 글

toggle...  (0) 2012.04.27

+ Recent posts