<script type="text/javascript">
function reset_checklist() {
/* Purpose: To clear wp-plugin frontend-checklist (checkboxes) cookies data.
Example: <a href="#" onclick="return reset_checklist();">refresh</a>
1) Cookies created with name such as frontend-checklist-1,frontend-checklist-2 and so on.
2) Check frontend-checklist existed for first 30 cookies.
3) You can set expiration date one year if want, no need here.
4) Set all existed frontend-checklist cookies to 0.
5) Reload page to reflect cookies update information.
*/
for (var i=1;i<30;i++) {
var expiration_date = new Date ();
// expiration_date . setYear (expiration_date . getFullYear () + 1);
// expiration_date = expiration_date . toGMTString ();
if (document.cookie.indexOf('frontend-checklist-' + i +'') >= 0)
{
document.cookie = 'frontend-checklist-' + i + '=0; expires=' + expiration_date + '; path=/';
}
}
window.location.reload(true);
return false;
}
</script>