01.
<html>
02.
<head>
03.
<title>ThaiCreate.Com jQuery Tutorials</title>
04.
<style>
05.
div { width: 80px; height: 80px; background:
#abc;
06.
border: 2px solid black; margin: 10px; float: left; }
07.
div.after { border-color: red; }
08.
</style>
09.
<script type=
"text/javascript"
src=
"jquery-1.6.4.js"
></script>
10.
<script type=
"text/javascript"
>
11.
$(document).ready(
function
(){
12.
13.
$(
"div:first"
).nextAll().addClass(
"after"
);
14.
15.
});
16.
</script>
17.
</head>
18.
<body>
19.
20.
<div>first</div>
21.
<div>sibling<div>child</div></div>
22.
<div>sibling</div>
23.
24.
<div>sibling</div>
25.
26.
</body>
27.
</html>