jQuery.cookie()
Categories: Utilities
jQuery.cookie( key )Returns: String
Plugin: jQuery.cookie
Description: Get the value of a cookie.
-
jQuery.cookie( key )
version added: 1.0key A string naming the cookie to get.
Get a previous stored cookie by a key name.
Thanks for this great plugin to Hartl.
-
Compare some versions control numbers.
Code:
// set a cookie $.cookie( 'foo', 'bar' ); // get get cookie $.cookie( 'foo' );
Results:
bar
jQuery.cookie( key, value, [ options ] )Returns: String
Plugin: jQuery.cookie
Description: Set a cookie.
-
jQuery.cookie( key, value, [ options ] )
version added: 1.0key A string naming the cookie to set.
value The new cookie value.
options A map of additional options pass to the method.
Set a new cookie.