代码编辑器:
1
2
<meta charset="utf-8">
3
<link href="/static/next/css/tryit.css?v=2017082407" rel="stylesheet"/>
4
<script src="https://cdn.staticfile.org/jquery/2.2.4/jquery.min.js"></script>
5
<style>
6
.siblings *{
7
display: block;
8
border: 2px solid lightgrey;
9
color: lightgrey;
10
padding: 5px;
11
margin: 15px;
12
}
13
</style>
14
<script>
15
$(document).ready(function(){
16
$("h2").nextUntil("h5",".1,.2,.3").css({"color":"red","border":"2px solid red"});
17
});
18
</script>