Adding and Removing Element

Size
2,119 Kb
Views
4,048

How do I make an adding and removing element?

What is a adding and removing element? How do you make a adding and removing element? This script and codes were developed by Esterling Accime on 23 January 2023, Monday.

Adding and Removing Element Previews

Adding and Removing Element - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Adding and Removing Element</title> <link rel="stylesheet" href="css/style.css">
</head>
<body>	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">	<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<div class="container" >
<div class="little-container"> <h1> Message:</h1> <input type="text" name="imessage" placeholder="Put your message here..." class="text">
<button class="add btn btn-primary">Add Message</button>
<button class="remove btn btn-danger">Remove Item</button>
</div>
<ol class="hey">
</ol>
</div>
<p class="add-class"></p> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Adding and Removing Element - Script Codes CSS Codes

.container{	width:550px;	height:500px;	background-color:#008B8A;	color:black;	border-radius:5px; overflow:scroll;
}
.little-container{	margin-left:20px;	position:relative;	top:5px;
}
h1{	color:white;
}
.text{ border-radius:10px; width:300px; height:40px; padding-left:20px;
}
li{ background-color:#FAEBD7; padding-left:10px; border-radius:10px; margin-top:8px; width:280px; height:40px;
}

Adding and Removing Element - Script Codes JS Codes

$(document).ready( function() {	$(".add").click(function (){	var addElement = $("input[name=imessage]").val();	$(".hey").append("<li>" +addElement+ "</li>");	});
$(".remove").click(function() {	$("li:last").remove();	});	});
Adding and Removing Element - Script Codes
Adding and Removing Element - Script Codes
Home Page Home
Developer Esterling Accime
Username accimeesterlin
Uploaded January 23, 2023
Rating 3
Size 2,119 Kb
Views 4,048
Do you need developer help for Adding and Removing Element?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Esterling Accime (accimeesterlin) Script Codes
Create amazing marketing copy with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!