Simple shopping cart with HTML5 Drag and drop and Javascript

Today i will show you simple shopping cart with Pure JavaScript and HTML drag and drop function getId(id){ return document.getElementById(id); } function dragStart(event){ event.dataTransfer.setData(‘text’,event.target.getAttribute(‘id’)); } function dragDrop(event){ event.preventDefault(); var productQuantiy = 1; var dropId = event.target.getAttribute(‘id’) var data = event.dataTransfer.getData(‘text’);…

ToDoList with JQuery and HTML5 Localstorage

Today i will show you ToDoList using jQuery, HTML5 Localstorage. This is the script document.getElementById(‘myForm’).addEventListener(‘submit’,saveToDo); function saveToDo(e){ elementValue = document.getElementById(‘todoId’).value; if(!elementValue){ alert(“You must enter a value in the New Task field”) return false; } var todo = { name:elementValue }…