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 8135743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T10:31:09+00:00 2026-06-06T10:31:09+00:00

This may be an easy question and perhaps I am missing something here. The

  • 0

This may be an easy question and perhaps I am missing something here.

The desired effect would be when a user clicks on the .left or .right href tags, the .tabs scroller will scroll left or right by 105px every time. This part is working.

Where I am running into a road block is how to disable the animate effect when the .tabs div’s css is at 0px or at the end of the div. This seems like it could easily be accomplished with offset or position but both of these are giving me a different value. I believe it’s because the .tabs div is actually centered using magin: 0 auto.

Trying to retrieve the css("left") and writing a conditional if == 0 statement is also a bust.

Am I missing something here? Should I not be trying to disable the left button based on position? Is there an easier way to do this?

$(".right").click(function () {
    $(".tabs").animate({
        left: '-=105'
    }, 500);
    return false;
});
$(".left").click(function () {
    $(".tabs").animate({
        left: '+=105'
    }, 500);
    return false;
});
  • 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-06T10:31:12+00:00Added an answer on June 6, 2026 at 10:31 am

    Based on comments in his question,

    $(".tabs").css('left') returns value in px

    So, to compare, either you do

    $(".tabs").css('left') === '0px'

    OR

    parseInt($(".tabs").css('left')) === 0

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

Sidebar

Related Questions

This may seem an easy question, but not to me, also a search has
This may be an extremely easy question but I can't get my head around
This may be a simple question but I can;t find the answer anywhere. Here
May be this question is too easy or I did not know how easy
This may be an easy question to answer but I could not find a
I am pretty new to rails so this may be an easy question, but
This may be a bit of an easy, headdesk sort of question, but my
this may be a easy question, but I really need a light to go
This may be an easy question, but I'm stuck. I am trying to implement
Sorry if this question may seem easy to some but i cannot seem to

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.