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

잔글 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight ))
 
(같은 사용자의 중간 판 하나는 보이지 않습니다)
2번째 줄: 2번째 줄:
;jQuery .prevUntil()
;jQuery .prevUntil()


<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>
17번째 줄: 17번째 줄:
     <div>박스5</div>
     <div>박스5</div>
</div>
</div>
</source>
</syntaxhighlight>
<jsfiddle height='200'>pzdx6uua</jsfiddle>
<jsfiddle height='200'>pzdx6uua</jsfiddle>


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


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


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

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

1 개요[ | ]

jQuery .prevUntil()
<script src='//code.jquery.com/jquery.min.js'></script>
<script>
$(function(){
    $('#mybox').prevUntil('p').css('background', 'orange');
});
</script>
<div>
    <div>박스1</div>
    <p>안녕하세요</p>
    <div>박스2</div>
    <div>박스3</div>
    <div id='mybox'>박스4</div>
    <div>박스5</div>
</div>

2 같이 보기[ | ]

3 참고[ | ]

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