Replace a DIV with another using effect and set cookie

Posted by Alex on Stack Overflow See other posts from Stack Overflow or by Alex
Published on 2010-06-18T15:40:22Z Indexed on 2010/06/18 15:43 UTC
Read the original article Hit count: 187

Filed under:
|
|
|

Hi. I've got some complicated requirements and wondered if there's a way to accomplish this via jQuery:

  1. User comes to a web page for the first time today and we show DIV_1.
  2. After 30 seconds, we dissolve DIV_1 to DIV_2.
  3. We set a cookie on the user's machine that expires when s/he returns tomorrow.
  4. If the same user returns today, we only show DIV_2.
  5. Tomorrow, we repeat the process: The user will see DIV_1 and then it dissolves to DIV_2.

How do you accomplish this via jQuery? Thank you.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about web-development