-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
74dfdc9
commit 11df858
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<!-- Write a jQuery program to manipulate an unordered list (<ul>) containing the items | ||
'Getting Started with Full Stack,' 'HTML,' and 'CSS.' Use the append() method to add a | ||
new list item 'CSS' at the end of the list, the prepend() method to add 'Introduction to | ||
Full Stack Development' at the beginning, the after() method to insert a paragraph | ||
'Topics updated' immediately after the list, and the before() method to add a heading | ||
'List of Topics Covered' immediately before the list. --> | ||
|
||
|
||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Q 5</title> | ||
<style> | ||
ul{ | ||
list-style-type: disc; | ||
padding-left: 20px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<script | ||
src="https://code.jquery.com/jquery-3.7.1.js" | ||
integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4=" | ||
crossorigin="anonymous" | ||
></script> | ||
|
||
<ul class="list"> | ||
<li>Getting started with full stack</li> | ||
<li>html</li> | ||
<li>css</li> | ||
</ul> | ||
|
||
<script> | ||
$(document).ready(function(){ | ||
$("#list").append("<li>css</li>"); | ||
$("#list").prepend("<li>Introduction to Full stack devlopment</li>"); | ||
$("#list").end("<p>Topics updated</p>"); | ||
$("#list").before("<h2>List of topics covered</h2>"); | ||
}) | ||
</script> | ||
</body> | ||
</html> |