Created
September 2, 2016 03:49
-
-
Save mroien/dbf409bdb195d0ef4585be78eeb5c06a to your computer and use it in GitHub Desktop.
Set all id's from input into local Storage
This file contains hidden or 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
$('#submit').on('click', function(){ | |
$('input').each(function(){ | |
var id = $(this).attr('id'); | |
var value = $(this).val(); | |
localStorage.setItem(id, value); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment