{"issue":{"state":"open","created_at":"2011-12-09T16:46:09Z","updated_at":"2011-12-09T16:46:09Z","comments":0,"user":{"gravatar_id":"45a4344b67955a227dd511bfebe0775d","id":1250594,"url":"https://api.github.com/users/PoZel","avatar_url":"https://secure.gravatar.com/avatar/45a4344b67955a227dd511bfebe0775d?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"PoZel"},"body":"Hi,\r\n\r\nNoticed something trying to adapt code to work for me.\r\n\r\nI have a list that is populated through javascript from a html5 database (local storage). I only want the list to be indexed once it has been populated from the database javascript call.\r\n\r\nAs such, I removed the \"indexed\" class from the wrapper div (to prevent a list index being created before the list is populated) and instead manually call initListIndex('page') once the db call completes.\r\n\r\nI noticed that this wasn't creating adding the IDs to the separators in the list and did some debugging to see why that was.\r\n\r\nIt comes down to line 239:\r\n\r\n```javascript\r\nif ($page.children().hasClass('indexed') && !$page.children().hasClass('listIndex')) {\r\n```\r\n\r\nThe code to index a single page check that there is an element with class \"indexed\". As far as I can see, you can only end up working on a single page if you call it manually or on \"pageInserted\". As \"pageInserted\" checks if there is a child with \".indexed\" (line 284), this check on line 239 seems redundant and results in a manually requested index failing.\r\n\r\nIt is somewhat likely that I have overlooked something here, but if I haven't, I think logically, line 239 can be changed to the following, which enables manual calling of indexing:\r\n\r\n```javascript\r\nif (!$page.children().hasClass('listIndex')) {\r\n```\r\n\r\nI look forward to hearing your thoughts on this.\r\n\r\nThanks again!!\r\n","assignee":null,"id":2503715,"number":84,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[],"title":"Manually Called List Index","html_url":"https://github.com/DataZombies/jQTouch/issues/84","closed_at":null,"url":"https://api.github.com/repos/DataZombies/jQTouch/issues/84","milestone":null},"action":"opened"}