I want to:
- Check to see if a cookie with name of "query" exists
- If yes, then do nothing
- If no, create a cookie "query" with a value of 1
Note: I am using jQuery 1.4.2 and the jQuery cookie plugin.
Does anyone have any suggestions as to how I can do this?
Similar to Jacobs answer but I prefer to test for undefined.
this??
what more do you want??
Alternatively, you could write a wrapper function for this:
Then you'd only need to write this in your client code: