Posted By

adriamooney on 08/04/10


jquery html5 contentEditable localstorage

Versions (?)

jquery localStorage for contenteditable content to remember edited content

 / Published in: jQuery


this shows you how to use localStorage to have a page remember content that has been edited with the html5 attribute, contenteditble

  1. //demo of localStorage
  3. $(function() {
  5. var someSection = document.getElementById('someSection');
  7. $(someSection).blur(function() {
  8. localStorage.setItem('toDoData', this.innerHTML);
  9. });
  11. if(localStorage.getItem('toDoData')) {
  12. someSection.innerHTML = localStorage.getItem('toDoData');
  13. }
  14. });
  16. <ul id="someSection" contenteditable="true">
  17. <li>add stuff here</li>
  18. </ul>

Report this snippet  


RSS Icon Subscribe to comments
Posted By: louboutinshoes on August 4, 2010

just because we love christian louboutin,also we think it will made you be more sexy.IN christian louboutin sale,you can get your luxury christian louboutin shoes at cheap price.christian louboutin shoes(born 1964) is a footwear designer who launched his line of high-end women's shoes in France in 1991.trademark protection of this red sole christian louboutin shoes,louboutin shoes,christian louboutin shoes on sale,christian louboutin sale,cheap ugg boots,ugg boots saleugg classic tall and ugg classic cardy,ugg classic short,cheap christian louboutin,christian louboutin pumps,cheap christian louboutin

You need to login to post a comment.