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 - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -