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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:03:01+00:00 2026-05-18T20:03:01+00:00

All, I’m implementing a Coda like jQuery slider (I’m using Niall Doherty’s excellent implementation:

  • 0

All,

I’m implementing a “Coda” like jQuery slider (I’m using Niall Doherty’s excellent implementation: http://www.ndoherty.biz/2009/10/coda-slider-2/).

Generally, it works great.

However, the issue I have is this… each “panel” contains several text inputs. If the user reaches the last input in a panel then clicks [TAB] (or the “Next” button on the iPad), Safari automatically moves the sliding wrapper to bring the next text input into view.

Of course, it only slides the wrapper just enough to bring the next text input into view – not enough to bring the entire next panel into view.

In other words – let’s say that each panel is 600px wide, and I have three panels.

So, if the user reaches the last input on the first panel, then clicks TAB, I’d like the wrapper to move by 600 pixels to bring the next panel fully into view. However, the browser just slides it enough so that the next text input is visible.

Has anyone run into this problem, and come up with a robust solution?

Many thanks in advance for any advice and insight!

  • 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-18T20:03:01+00:00Added an answer on May 18, 2026 at 8:03 pm

    Ha! I figured it out!

    The problem is that when the input is out of the visible area, the browser scrolls the div so it is visible. Since your #coda-slider, or whatever id you call it, doesn’t have a scroll bar, you can’t see what’s going on and you can’t manually move it back.

    Note, that coda-slider does not alter the scroll position, so even if the coda-slider moves, it is still offset by the scroll offset.

    However, you can simply set the scroll position to 0 every time an input gets focus whenever the #coda-slider changes scroll position. Then you can figure out which tab that input is in and trigger coda to do it’s magic. You might as well scrollTop(0) as well, in case your content is different heights.

    $('#coda-slider-1').scroll( function() {
        $('#coda-slider-1').scrollLeft(0);
        $('#coda-slider-1').scrollTop(0);
    });
    
    $('input').focus( function() {
        var tabindex = $(this).parents('.panel').prevAll('.panel').size() + 1;
    
        $('.tab' +tabindex +' > a').trigger('click');
    });
    

    Example here:

    http://jsfiddle.net/u99AJ/

    Update:

    Something even stranger is going on with Safari. This does not work.

    Update2:

    The order of focus and scroll seems to have a strange effect in Safari. Example updated for cross-browser support:

    http://jsfiddle.net/u99AJ/4/

    Update3:

    Added code (in jsfiddle example below) to workaround coda-slider bug where animate is still called even when clicking on the same tab. This may cause the tab switch to seem to delay in some cases, especially when tabbing quickly through the inputs.

    http://jsfiddle.net/u99AJ/7/

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

Sidebar

Related Questions

All too often I want a WPF slider that behaves like the System.Windows.Forms.TrackBar of
All thread create methods like pthread_create() or CreateThread() in Windows expect the caller to
All the table names are appended with a 's'? Like table test will appear
All the examples of Silverlight using MVVM use interface named IPropertyChanged. What is the
All, In Apple's sample code DateCell http://developer.apple.com/library/ios/#samplecode/DateCell/Introduction/Intro.html the ivar pickerView is declared in MyTableViewController.h
All, Currently I have a Facebook page that gets updated every few minutes using
All, I have a requirement to hide my EF implementation behind a Repository. My
All, I'm using PHPLint to evaluate a PHP script I'm writing, and it returns
All the articles I've found via google are either obsolete or contradict one another.
All the recent VisualSVN Server posts made me want to check it out. I

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.