[jQuery] Re: save pointer to element in a cookie

2009-02-17 Thread Karl Swedberg
you could store the link's index: $('#yourlist a').each(function(index) { $(this).click(function() { $.cookie('mylink', index); // do something else? /* (?) */ return false; }); }); Then, you can select it like this: if ( $.cookie('mylink') != null ) { $('#yourlist

[jQuery] Re: save pointer to element in a cookie

2009-02-17 Thread junk.mail...@gmail.com
Thanks for the code samples Carl. I did try to save the index, but must have been doing something wrong. I'm glad to have a code sample to go by. Cheers, Marty On Feb 17, 1:53 pm, Karl Swedberg k...@englishrules.com wrote: you could store the link's index: $('#yourlist