First Draft

First Draft of the Example Files
This commit is contained in:
RobinNixon
2020-12-10 13:21:38 +00:00
parent 77a7b57c4f
commit 0335342e00
1127 changed files with 46959 additions and 56 deletions
+24
View File
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<title>DOM Traversal: Siblings</title>
<script src='jquery-3.5.1.min.js'></script>
</head>
<body>
<ul>
<li class='new'>Item 1</li>
<li id='two' class='new'>Item 2</li>
<li >Item 3</li>
<li class='new'>Item 4</li>
<li class='new'>Item 5</li>
<li >Item 6</li>
<li >Item 7</li>
</ul>
<script>
$('#two').siblings('.new').css('font-weight', 'bold')
// Alternative to select from all siblings, including the callee
// $('#two').parent().children('.new').css('font-weight', 'bold')
</script>
</body>
</html>