"JQuery .nextAll()"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight ))
 
(같은 사용자의 중간 판 하나는 보이지 않습니다)
4번째 줄: 4번째 줄:
:단 셀렉터 있을 경우, 그에 따라 대상이 한정됨
:단 셀렉터 있을 경우, 그에 따라 대상이 한정됨


<source lang='html5'>
<syntaxhighlight lang='html5'>
<script src='//code.jquery.com/jquery.min.js'></script>
<script src='//code.jquery.com/jquery.min.js'></script>
<script>
<script>
20번째 줄: 20번째 줄:
     <div>박스6</div>
     <div>박스6</div>
</div>
</div>
</source>
</syntaxhighlight>
<jsfiddle height='200'>jfja5wpo</jsfiddle>
<jsfiddle height='200'>jfja5wpo</jsfiddle>


28번째 줄: 28번째 줄:
*[[jQuery .prevAll()]]
*[[jQuery .prevAll()]]


==참고 자료==
==참고==
*https://api.jquery.com/nextAll/
*https://api.jquery.com/nextAll/
*http://www.w3schools.com/jquery/traversing_nextall.asp
*http://www.w3schools.com/jquery/traversing_nextall.asp


[[분류: jQuery]]
[[분류: jQuery]]

2020년 11월 2일 (월) 02:53 기준 최신판

1 개요[ | ]

jQuery .nextAll()
  • 이후의 모든 요소를 선택하는 jQuery 메소드
단 셀렉터 있을 경우, 그에 따라 대상이 한정됨
<script src='//code.jquery.com/jquery.min.js'></script>
<script>
$(function(){
    $('#mybox').nextAll().css('background', 'yellow');
    $('#mybox').nextAll('.red-text').css('color', 'red');
});
</script>
<div>
    <div>박스1</div>
    <div id='mybox'>박스2</div>
    <div>박스3</div>
    <div class='red-text'>박스4</div>
    <div class='red-text'>박스5</div>
    <div>박스6</div>
</div>

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}