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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:32:20+00:00 2026-05-16T07:32:20+00:00

I have a list of elements I would like to be able to have

  • 0

I have a list of elements I would like to be able to have brought into focus when the user is selecting items. I’ve tried calling .focus() with Jquery on these objects to no avail. Is there anything I’m missing? 🙂

EDIT:
I have a list (ul) of elements. I shift click on a starting item and and press the arrow keys to continue selecting. Up and down. I would really like for the shift selection to function as if it was in Finder or Windows Explorer. Scrolling up when an item is selected that’s not visible (and down for the same case).

Are there any handy jQuery plugins to handle this for me?

EDIT2:
Figured out some things and determined a larger problem.

Right now I am using the jQuery plugin called scrollTo. I can scroll to an element of my list using this plugin. However, “scrolling” to an item means it is now the first item in the list, which is NOT desirable behavior. Select any number of items in Finder or Explorer and see that when you shift-arrow select an item that’s offscreen, it only scrolls down one item’s worth of space and does NOT make it the top element.

Easy to fix of course. 😉 I am currently keeping track of the current element just off screen on the top and the current element in the list that’s just offscreen on the bottom. However, when the user selects an item out of the list after they have done some scrolling, I currently have no way to tell what elements are just out of sight, creating an impasse.

Any ideas? 😛

  • 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-16T07:32:21+00:00Added an answer on May 16, 2026 at 7:32 am

    It’s not clear from your question, but if you’re talking about automatically scrolling the page (or element) so that a particular element is in the viewport, you might try the scrollTo plugin.

    $.scrollTo('#something'); // scrolls the whole page so #something is in view
    $('#mydiv').scrollTo('#somethingelse'); // scrolls the (scrollable) div
    

    Edit: Your question update provides a little more insight into what you’re looking for. I’m not clear on what method you’re using to achieve the shift-selection (or if you’re actually expanding the question to ask how to do that). But assuming you’re still just asking about the scrolling piece, I would add the scrolling call in a function attached to whichever event (custom?) is fired when you add another list item to your selection.

    For example, assuming you’re triggering a custom event called list_expanded each time an <li> is selected, you could try something like this:

    $(document).ready( function(){
      $('ul#mylist').delegate('li','list_expanded', function(){
        $(this).scrollTo();
      });
    });
    

    Obviously you can also use a “regular” event like click, depending on how your multiple-select solution works.

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

Sidebar

Related Questions

I have a list of elements which I would like to make sortable and
If I have a list of elements I would like to sort, Java offers
I have list elements like so: <li> <strong style=color: #BBB;>1</strong> <a href=>Matt</a> <b>4 days
I have a list of elements that I want to split into individual lists
I have a few list elements, like this: <li class=item> <a class=toggle><h4>ämne<small>2010-04-17 kl 12:54
I would like to be able to have a pattern that matches only expressions
I have the following table format and would like to be able to add
I have a sticky side menu that I would like to have be able
I have a list with two elements like this: list_a = [27.666521, 85.437447] and
I would like to iterate through all elements in an std::list in parallel fashion

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.