Setting a Cookie With jQuery

Next Video:
jQuery Pop-Up Message Tutorial....5

A cookie is a text file that stores information on a user's computer for later access. Find out about setting a cookie with jQuery with help from a self-taught web developer in this free video clip.

Part of the Video Series: Web Programming
Promoted By Zergnet


Video Transcript

Hi, I'm Christina Chiu. I'm a Computer Web Specialist, and today I'm going to show you how to setting up a cookie using jQuery. So, we'll open up our text header here, we will see in our HTML file the link to the jQuery library in the and then a link to our own jQuery file which is test.js. So, we're going to open test.js and you'll see a document that already function and to set the up the cookie is, we're going to use the cookie plug in. So, to use a cookie plug in, simply type in dollar sign dot cookie. And the name of our cookie is going to be test and we're going to set it with the value of 1. And if we want the cookie to expire, so we'll simply create a function for it and to do so, we'll make it expires 10, which means it'll expire in 10 days. So, that is how you create a cookie using jQuery. Thanks so much for your time, my name is Christina Chiu.


Related Searches

Is DIY in your DNA? Become part of our maker community.
Submit Your Work!