Created
August 29, 2010 09:59
-
-
Save cgcardona/556165 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function doSetItem() { | |
// get the lat, lon, and epoch ready for storage | |
var lat = $("#lat").text() | |
var lon = $("#lon").text() | |
var datestamp = new Date() | |
var epoch = datestamp.getTime() | |
// create the JSON for the database | |
var storageLocationObject = {"lat": lat, "lon": lon} | |
localStorage.setItem(epoch, storageLocationObject) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment