Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 687 Bytes

README.md

File metadata and controls

39 lines (26 loc) · 687 Bytes

toLocalStorage

Easy way to create local storages by setting the keys and the expiration time.

NOTE: jQuery is required.

Usage

Just include toLocalStorage.js

<script type="text/javascript" src="lib/toLocalStorage.js"></script>

API

  • $(yourObject).toLocalStorage("setItem", { Key: "yourKey", ExpirationInMinutes: 60 });
  • $.fn.toLocalStorage("getItem", "yourKey")
  • $.fn.toLocalStorage("clear", "yourKey");

Supported Browsers

  • Chrome 4+
  • Firefox 3.5+
  • Safari 4+
  • Opera 10+
  • IE 8+ (Oh God!)

TODO / Bugs

  • Have a more interesting test/example.
  • Add further fetures to handle the local storage.