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

  • SEARCH
  • Home
  • 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 7898825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:32:26+00:00 2026-06-03T08:32:26+00:00

I am sure this is easy but I’ve looked all over with no luck.

  • 0

I am sure this is easy but I’ve looked all over with no luck. I have written a paging jQuery script that animates a list on my page. I have next and previous buttons which I am showing/hiding depending on where you are in the list however it doesnt pick up the position change the first time. Here is my code in jsFiddle:

http://jsfiddle.net/mikeoram/t4787/

I’m sure I’m only missing something simple, all suggestions would be helpful.

Please only answer my question, there are reasons I’m doing it the way I am, and i no it can be done differently.

Thanks,

Mike

  • 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-06-03T08:32:27+00:00Added an answer on June 3, 2026 at 8:32 am

    First of all, top is a reserved variable that refers to the top window in the hierarchy. Always declare the variables inside functions so it doesn’t mess with the rest of your code:

    var top = $('.paginate').css('top');
    

    Second, use regex to remove the non digits from the top value, so it will always be a valid integer:

    See this http://jsfiddle.net/MaLDK/1/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm sure this is an easy question, but I don't have an answer for.
I am sure this is an easy question, but one that has escaped me
Im sure this question is so easy for all you experts, but I am
I am sure there is no easy way to do this but I have
Sorry, I'm sure this is an easy test but I don't have access to
I'm sure this is easy, but I'm failing to find it. I have a
I'm sure this is easy but I can't figure it out: I have an
Sorry I am sure this is easy but I have spent ages trying to
I'm sure this is easy for you all but this is all new to
I am sure this is easy - but I can't figure it out right

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.