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

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -