Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- $(document).ready(function () {
- $("#saveForm").click(function() {
- $.cookie('myCookie', $("#element_1").val(), { expires: 365 });
- });
- });
- </script>
- <script>
- alert( $.cookie("myCookie") );
- </script>
- $(document).ready(function () {
- $("#saveForm").click(function () {
- $.cookie('myCookie', $el1.val(), {
- expires: 365
- });
- });
- //set the value of the cookie to the element element_1
- var $el1 = $("#element_1").val($.cookie("myCookie"))
- });
- $(document).ready(function () {
- $("#saveForm").click(function() {
- $.cookie('myCookie', $("#element_1").val(), { expires: 365 });
- });
- $("#element_1").val($.cookie('myCookie'));
- });
Add Comment
Please, Sign In to add comment