Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6908565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:34:44+00:00 2026-05-27T08:34:44+00:00

I am looking at writing a cookie that will be updated everytime the ‘news

  • 0

I am looking at writing a cookie that will be updated everytime the ‘news scroller’ moves to the next image/news item. when a user returns to the page it will automatically then start the scroller from the next news item.. helping to ensure our users get to see all the items.

i am using the ‘anything scroller’ by chris coyier et al, with php to pull in the news data.

each

  • element has a unique id and are in numerical order so my cookie needs to retrieve the latest value and then +1 . the scroller allows for triggers to specific items.. but i can’t seem to get the cookie to update on each, moreover it loads once the maximum id of those rendered in html…

    is this even practical? assuming a maximum of 10 news items, would it slow the website down.

    edit this is the could trying to get some output to the browser / console… but nothing.

           <script>
          // Set up Sliders
          // **************
          $(function(){
          $('#slider').anythingSlider({
          theme : 'minimalist-round',
          easing : 'swing',
          infiniteSlides : true,
          delay : 8000, // How long between slideshow transitions in AutoPlay mode (in milliseconds)
          resumeDelay : 8000, // Resume slideshow after user interaction, only if autoplayLocked is           true (in milliseconds).
          animationTime : 1, // How long the slideshow transition takes (in milliseconds)
          autoPlayLocked : true, // If true, user changing slides will not stop the slideshow
          })
          $('#slider').bind('slide_complete', function(event, slider){
          console.debug( 'You are on page ' + slider.currentPage );
          // Do something else
          })
          });
          </script>
    
    • 1 1 Answer
    • 0 Views
    • 0 Followers
    • 0
    Share
    • Facebook
    • Report

    Leave an answer
    Cancel reply

    You must login to add an answer.

    Forgot Password?

    Need An Account, Sign Up Here

    1 Answer

    • Voted
    • Oldest
    • Recent
    • Random
    1. Editorial Team
      Editorial Team
      2026-05-27T08:34:45+00:00Added an answer on May 27, 2026 at 8:34 am

      solution: using local storage this works

        <script type="text/javascript">
        var ls = null, // local storage
        sp = 1;    // starting page
      
        if ('localStorage' in window && window['localStorage'] !== null) {
        ls = window.localStorage;
        sp = ls.getItem('anythingSlider') || 1;
      
        }
        </script>
      

      and

        <script>
               $('#slider').anythingSlider({
      
      startPanel: sp,
      // Callback when slide completes - no event variable!
      onSlideComplete: function(slider) {
          if (ls) {
              ls.setItem('anythingSlider', (slider.currentPage+1));
              $('.storage').val(slider.currentPage);
          }
      }
       </script>
      
      • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
        • Report

    Sidebar

    Related Questions

    My company is looking into writing a custom application that will need to perform
    I'm looking at writing an app which will use text present on a user's
    I am looking at writing some software that will allow me to listen to
    I'm looking at writing a mashup app that will take submission titles from a
    So I'm looking at writing an iPhone application that shows things on a map.
    I'm looking into writing a wxWidget that displays a graphical node network, and therefore
    I'm looking at writing monitoring code that runs inside a Java application and periodically
    I'm looking into writing a small custom app for a small business that can
    I'm looking into writing a tool that mounts certain external disks as read-only when
    so right now I'm writing a Windows 7 Gadget using Javascript (w/HTML) that will

    Explore

    • Home
    • Add group
    • Groups page
    • Communities
    • Questions
      • New Questions
      • Trending Questions
      • Must read Questions
      • Hot Questions
    • Polls
    • Tags
    • Badges
    • Users
    • Help
    • SEARCH

    Footer

    © 2021 The Archive Base. All Rights Reserved
    With Love by The Archive Base

    Insert/edit link

    Enter the destination URL

    Or link to existing content

      No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.