jQuery Cookie only setting when logged in as a WordPress Admin -


i trying set cookie when link clicked on website. works fine if logged in wordpress admin. if i'm not logged in , browse website normal user, not set cookie.

here code:

$(function(){   $("#fl-link").click(function() {    jquery.cookie("cookie_language", null, { path: '/' , domain: 'domain.com' });        jquery.cookie('cookie_language', 'florida', { path: '/' , domain: 'domain.com', expires: 365 });    }); }); 

any suggestions?


Comments

Popular posts from this blog

javascript - Knockout pushing observable and computed data to an observable array -

'hasOwnProperty' in javascript -

sitecore - Resolve ISitecoreService using SimpleInjector -