www.webdeveloper.com
Results 1 to 2 of 2

Thread: Use a cookie to enable/disable a javascript?

Hybrid View

  1. #1
    Join Date
    Sep 2011
    Posts
    12

    Use a cookie to enable/disable a javascript?

    Never used cookies before and have only started using JS

    So what I'm trying to do is use cookies to remember if the user want's to have snow displaying or not (using an external http://epicurus-rsps.net/forum/jscripts/snowfall.js) on my MyBB forums.
    By default I've got it hidden because it does cause some lag which somes users may not be able to handle.

    I've got a link in the nav bar with (Show/hide snow) which when clicked I want to enable/disable the JavaScript (http://epicurus-rsps.net/forum/jscripts/snowfall.js)

    I searched the forums but I was getting nowhere so I thought it was time to start a new thread.

    I've really no idea what I'm doing :/

  2. #2
    Join Date
    Aug 2008
    Location
    Sweden
    Posts
    227
    The way cookies are saved and fetched is a but weird, but easy to understand. I suggest you check out this article about cookies on QuirksMode to begin with.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles