javascript - Long UL list in DIV, auto scroll to LI element -


I have such a strange problem, I have a div

  _inputHelper // Fixed height (200 pixels)   

Very long, too long ; Ul & gt; In the list (about 200 elements) and I would like to scroll using jQuery in some & lt; Li & gt; , but the problem is, when I scroll the whole list like this:

  $ (_inputHelper.find ('ul')) .met ({top: -1 * ($ (_ It). Position () top - $ (_ it). (())}, 200);   
  _this is a light element that I would like to scroll down to    

, But I can not scroll the list using the mouse, here's a printer screen to be more accurate:

long ul diva auto scroll problem

I think I can scroll incorrectly, but I also tried scroll tap / margin-top and also And it still does not work.

Some tests:

Any help?

Depending on your Bela, please give it to you scrollTop , try it:

  $ ('Input-Assistant'). Animate ({scrollTop: $ ("# test"). Position (). Top,}, 200);   


In your code, you are simply moving the ul element and then the original Out of view; Now with this you are changing the parents' book.

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -