codrops/Windy — pull request #2 by Sapphire64 (2012-10-25 13:42:33+00:00)
Title: Index recalculation for update function

If we are prepending element into Windy's `

` before currently selected element we have to recalculate indexes. So update function works fine now if we are appending element (adding next), but due to index = 0 we cannot move to newly prepended element (real index 0).

BTW, test example for documentation:
``` javascript
$('#wi-el').prepend($li_el.join('\n'));
windy.update();
windy.prev();
```
This code works fine in my project (at least in current development process) for ecommerce items pages, thank you for such wounderful product :)