Q:

Write a program to places a border around all list items that are children of a specified class of an unordered list using jquery

0

Write a program to places a border around all list items that are children of a specified class of an unordered list using jquery

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

HTML Code :

<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-git.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Border around all list items that are children of  a specified class of an unordered list.</title>
</head>
<body>
<ul class="tutorial">
<li>Frontend</li>
<li>Backend
<ul>
<li>C#</li>
<li>Java</li>
<li>PHP</li>
<li>Python</li>
</ul>
</li>
<li>Database
<ul>
<li>MySQL</li>
<li>PostgreSQL</li>
<li>SQLite</li>
<li>Oracle</li>
</ul>
</li>
</ul>
</body>
</html>

JavaScript Code :

$( "ul.tutorial > li" ).css( "border", "3px double blue" );

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now