How to scroll to bottom of the ul?

cordova, html, javascript, jquery, jquery-ui

Solution

Add the `tabindex` attribute:

<li tabindex="1"></li>

http://jsfiddle.net/DerekL/GEsmb/

Because you can not focus on `li`. It's not a text field or button or something like that.

Problem

I have developed one application using PhoneGap. In my application I have displayed a number of elements in a listview using `ui` `li`. Here I want to scroll to the last element in list. For that i have used following code, ``` $('#dates li').last().addClass('active-li').focus(); $('#dates li').last().focus(); ``` I have used this one also, ``` $('#dates').scrollTop($('#dates li:nth-child(14)').position().top);; ``` extra class is adding but focus is not working.

Original source