현재 라디오 버튼으로 문서로드 기능으로 제어되는 다음 명령문을 변경하는 방법을 누구에게도 알려 줄 수 있습니까?jQuery 함수를 페이지로드로 변경
기본적으로 페이지가로드 될 때 슬라이드 div가 왼쪽에서 오른쪽으로 슬라이드되기를 원합니다. jQuery를 :
jQuery(function() {
jQuery('#slide').hide();
jQuery(':radio[name=radiobutton]').click(function() {
var value = $(this).val();
if (value === 'Y') {
jQuery('#slide').show('slow');
} else if (value === 'N') {
jQuery('#slide').hide('slow');
}
});
HTML :
<div id="slide" class="alpha60">
<p class="statement_style_head">Content goes here</p>
<p class="statement_style_text">A line or two of text goes here </p>
</div>
에 대한 모범 사례는이 링크를 시도 할 수 있습니다 슬라이딩 예제 : http://www.learningjquery.com/2009/02/slide-elements-in-different-directions –