Toggle navigation
Bootsnipp
Bootstrap
For
CSS Frameworks
Bootstrap
Foundation
Semantic UI
Materialize
Pure
Bulma
References
CSS Reference
Tools
Community
Page Builder
Form Builder
Button Builder
Icon Search
Dan's Tools
Diff / Merge
Color Picker
Keyword Tool
Web Fonts
.htaccess Generator
Favicon Generator
Site Speed Test
Snippets
Featured
Tags
By Bootstrap Version
4.1.1
4.0.0
3.3.0
3.2.0
3.1.0
3.0.3
3.0.1
3.0.0
2.3.2
Register
Login
"Learning jQuery and Bootstrap"
Bootstrap 3.3.0 Snippet by
jfisher6
3.3.0
jQuery
Preview
HTML
CSS
JS
View Full Screen
Forked from
Fork
Fork this
Parent
870
 
0 Fav
Post to Facebook
Tweet this
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="row"> <h2>Learning jQuery</h2> <br> <button type="button" class="btn btn-success">Hide something</button> <hr> <p>This is a paragraph with little content.</p> </div> <!--List--> <div id="list_section"> <h1 id="header">To-do list</h1> <ul> <li class="item">Buy movie tickets</li> </ul> <div id="newItemButton"><button href="#">new item</button></div> <form id="newItemForm"> <input type="text" id="itemField" placeholder="Item" /> <input type="submit" id="add" value="add" /> </form> </div> <script src="https://code.jquery.com/jquery-1.12.3.js" integrity="sha256-1XMpEtA4eKXNNpXcJ1pmMPs8JV+nwLdEqwiJeCQEkyc=" crossorigin="anonymous"></script> <script src="js/your_js_file.js"></script>
h2 { color: 'red' } body { background-color: #85cff7; font-family: 'Helvetica', 'Arial', sans-serif; } #list_section { text-align: center; } h1 { color: white; margin: 0px auto; padding: 20px; } ul { padding: 0; } li { background-color: #fff; color: #000; font-size: 20px; list-style-type: none; width: 20%; margin: 0px auto; border-radius: 3px; border: 1px solid #000; padding: 10px; margin-bottom: 10px; } p { background-color: #fff; color: #666; padding: 10px; display: inline-block; margin: 20px auto 20px auto; width: 80%; border-radius: 5px; text-align: center; } .item { background-color: #fff; color: #000; } input[type='text'] { font-size: 12px; padding: 6px; border: 1px solid #000; border-radius: 3px; } input[type='submit'] { background-color: #fff; color: #000; border-radius: 8px; border: none; padding: 5px; } #newItemButton { display: none; } #itemField { margin-top: 60px; width: 10%; }
$(document).ready(function(){ $("button").click(function(){ $("p").toggle(); }); }); $(function() { var $list, $newItemForm; $list = $('ul'); $newItemForm = $('#newItemForm'); $newItemForm.on('submit', function(e) { e.preventDefault(); var text = $('input:text').val(); $list.append('<li>' + text + '</li>'); $('input:text').val(''); }); $list.on('click', 'li', function() { var $this = $(this); $this.remove(); }); });
Related:
See More
Free Template
Paper Dashboard Angular
Questions / Comments:
Post
Posting Guidelines
Formatting
- Now
×
Close
Donate
BTC: 12JxYMYi6Vt3mx3hcmP3B2oyFiCSF3FhYT
ETH: 0xCD715b2E3549c54A40e6ecAaFeB82138148a6c76