开发者

Setting a cookie with jQuery Cookie plugin?

I am trying to create a popup ad with a custom lightbox feel and I can get the popup to work, but it is not setting the cookie. Any ideas on what this could be? Since the code is so long, I am posting it as a GitHub Gist here: http://g开发者_如何转开发ist.github.com/501348

Thanks in advance all, Josh


I don't know if what I am going to say will help, but it works for me.

I put an alert after the cookie set on line 16 in your code and it set to shown. I put an alert after line 29 and it hit (when I closed and opened a fresh browser). Once hit the browser kepts returning "shown".

This was the jQuery cookie plugin I used, I am guessing it is the same as the one you used.

Just going to ask a few "are you sure" style question so apologies:

1) Do you have JavaScript enabled?

2) Are you sure your script isn't erroring? When running in IE all the console calls are invalid and will return as errors (breaking the javascript), try commenting those lines out.

Cheers

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜