JQuery - Set all cookies ending with
- by Israfel
I'm wondering if it's possible to use a wildcard to select multiple cookies. I'm using jquery to save various scroll position and would like to clear them out in one go. At the moment I clear them out individually as below
function clearScroll(elementID) {
if ($.cookie) {
$.cookie(elementID + '_scrollpos', 0);
}
}
What I'd like is a clear all something like below.
function clearAllScroll() {
if ($.cookie) {
$cookie([name$='_scrollpos'],0);
}
}
Is this possible?