Hi I am learning jQuery and right now I am trying to use jQuery Cookie to set a form input value.
I have been able to set the cookie from a form using this:
<script>
$(document).ready(function () {
$("#saveForm").click(function() {
$.cookie('myCookie', $("#element_1").val(), { expires: 365 });
});
});
</script>
I was able to verify the cookie using an alert like this:
<script>
alert( $.cookie("myCookie") );
</script>
But after searching numerous posts on here, I was not able to find the same question and I have looked at numerous tutorials and can't find the code to set the value of a input field in a form. Thanks in Advance!!