Bootstrap-jquery Address Book
How do I make an bootstrap-jquery address book?
Bootstrap-jquery Address Book that used module revealing pattern. What is a bootstrap-jquery address book? How do you make a bootstrap-jquery address book? This script and codes were developed by Omran Abazid on 09 September 2022, Friday.
Bootstrap-jquery Address Book - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title> bootstrap-jquery Address Book </title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <html>
<body> <div class="container"> <header> <h1>Address Book</h1> <hr /> </header> <table id='table1' class="table table-bordered"> <thead> <tr> <th>First Name</th> <th>Last Name</th> <th>Phone</th> <th>Action</th> </tr> </thead> <tbody> </tbody> <tfoot> <tr> <td> <input id='firstName' class='form-control' type="text" /> </td> <td> <input id='lastName' class='form-control' type="text" /> </td> <td> <input id='phone' class='form-control' type="text" /> </td> <td> <div class="text-center"> <button id='add' class='btn btn-block' />Add</button> </div> </td> </tr> </tfoot> </table> </div>
</body>
</html> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Bootstrap-jquery Address Book - Script Codes CSS Codes
input { background:rgba(0,0,0,0); border:none; width: 100%; height: 100%;
}
Bootstrap-jquery Address Book - Script Codes JS Codes
//https://jsfiddle.net/L3615eL1/
var addressBook = (function() { var people = [{ firstName: 'Omran', lastName: 'Abazid', phone: '123456789' }]; //cash the dom var table = $('#table1'); var tbody = table.find('tbody'); var $firstName = table.find('#firstName'); var $lastName = table.find('#lastName'); var $phone = table.find('#phone'); var $button = table.find('#add'); var $btnSave = table.find('#save'); var $btnEdit = table.find('#edit'); var $btnRemove = table.find('#remove'); var $input = table.find(".edit"); //bind events $button.on('click', addPerson); table.on('click', '#remove', deletePerson); /*table.on("change",'.edit' ,editPerson);*/ console.log($input); _render(); //render function _render() { tbody.html(''); var length = people.length; for (var i = 0; i < length; i++) { table.prepend('<tr><td><input class="edit" type="text" value="' + people[i].firstName + '" ></td><td><input class="edit" type="text" value="' + people[i].lastName + '" ></td><td><input type="text" class="edit" value="' + people[i].phone + '" ></td><td> <button id="remove" class="btn btn-block">X</button></td></tr>'); } } //custom function function addPerson() { var person = { firstName: $firstName.val(), lastName: $lastName.val(), phone: $phone.val() }; people.push(person); $firstName.val(''); $lastName.val(''); $phone.val(''); _render() } function deletePerson(event) { var element = event.target.closest('tr'); var i = table.find('td').index(element); people.splice(i, 1); _render(); } /* function editPerson(event){ var element=event.target.closest('tr'); var i=table.find('tr').index(element); var index = (table.find('tr').length -i)-1; console.log(element.firstChild()); var person= { firstName: , lastName: $lastName.val(), phone: $phone.val() }; _render(); }
*/ return { addPerson: addPerson, deletePerson: deletePerson };
})();
Developer | Omran Abazid |
Username | OmranAbazid |
Uploaded | September 09, 2022 |
Rating | 3 |
Size | 2,650 Kb |
Views | 18,216 |
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 |
Bootstrap Portfolio Website | 4,146 Kb |
Twitch API Template | 3,530 Kb |
FCC Campers News | 2,535 Kb |
Tic tac toe | 3,323 Kb |
A Pen by Omran Abazid | 1,522 Kb |
Bootstrap page Header Template | 3,140 Kb |
Quote Machine | 3,091 Kb |
Simple Jquery Calculator | 2,462 Kb |
Simon Game without jquery | 3,370 Kb |
Pomodora Timer | 2,624 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 |
Beveled corners using CSS border attribute | DawsonMediaD | 2,136 Kb |
Navier Stoke Fluid Simulation | Esimov | 8,584 Kb |
Z-index demo | Kblh | 1,534 Kb |
Pattern lab logo | TimPietrusky | 3,666 Kb |
Vue.js Starter | Andymerskin | 1,268 Kb |
CSS3 Butterfly | Timohausmann | 3,430 Kb |
Material design buttons | Fischaela | 4,381 Kb |
Electric worm | Jeffibacache | 2,377 Kb |
Emberjs Bootstrap Modal Carousel | Somethingkindawierd | 4,233 Kb |
Text Looping Transition | Agelber | 5,619 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!