Shopping List Example
How do I make an shopping list example?
What is a shopping list example? How do you make a shopping list example? This script and codes were developed by Matt Shull on 28 September 2022, Wednesday.
Shopping List Example - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Shopping List Example</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <input id="item"><button id="submit">Submit</button>
<br><br>
<button id="clear">Clear</button>
<br><br>
<ul id="list"> <li>Item 1 <button class="remove">Remove</button></li> <li>Item 2 <button class="remove">Remove</button></li> <li>Item 3 <button class="remove">Remove</button></li>
</ul> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Shopping List Example - Script Codes CSS Codes
#list { list-style:none; padding:0;
}
#list > li { cursor:pointer; text-align:center; font-size:18px; padding:5px 0px;
}
.checked { background-color:gray; color:white;
}
Shopping List Example - Script Codes JS Codes
$("#submit").on("click", function() { var item = $("#item").val(); $("#list").prepend("<li>"+item+" <button class='remove'>Remove</button></li>");
});
$("#list").on("click", "li", function() { $(this).toggleClass("checked");
});
$("#list").on("click", ".remove", function() { $(this).closest("li").remove();
});
$("#clear").on("click", function() { $(".checked").remove();
});
$("#item").keydown(function(e) { if (e.which == 13) { var item = $("#item").val(); $("#list").prepend("<li>"+item+" <button class='remove'>Remove</button></li>"); }
});
Developer | Matt Shull |
Username | derekshull |
Uploaded | September 28, 2022 |
Rating | 3 |
Size | 1,951 Kb |
Views | 34,408 |
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!
Name | Size |
SPP Mainpage | 4,446 Kb |
About Me Page | 1,668 Kb |
Tri-Cities Interior Wireframe | 5,449 Kb |
Angular Responsive Select Box | 1,832 Kb |
Inline vs Inline Block vs Block | 1,960 Kb |
CSS Only Modal | 1,815 Kb |
List Animation | 1,886 Kb |
AngularJS Dropdown Menu | 2,490 Kb |
Shopping List App | 1,709 Kb |
CSS Only Dropdown Menus | 1,676 Kb |
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!
Name | Username | Size |
Sticky div | Kaslab | 2,225 Kb |
Elon Musk - Tribute Page - FreeCodeCamp | Yunnimun | 8,615 Kb |
Image Hover | Johnheiner | 3,409 Kb |
DNA Double Helix | Hugo | 5,112 Kb |
Incremental game | Eprouver | 5,868 Kb |
Reading Grid | Tappily | 4,306 Kb |
Console fun | Dviate | 1,500 Kb |
Simple personal profile | Miroot | 2,856 Kb |
Michelle, submit your photography to Unsplash. | Zaneriley | 3,368 Kb |
Blog Concept 2 | JGallardo | 2,994 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!