@innoreal,
There was a problem in the creation of your list. More specifically on this part. See highlighted code:
var itemCnt = results.rows.length;
itemCnt = +itemCnt;
//remove current list items
list.children(‘#m1-listnote-listItem1’).remove();
//build list
firstItemClass = ‘m1-first’;
internalItemClass = ‘ m1-clickable m1-highlight m1-hyperlink-internal’;
lastItemClass = ‘ m1-last’;
for (i=0; i <= itemCnt; i++) {
//…
//…
//build list css class list
cssClassList = i==0 ? firstItemClass : ”;
Note that itemCnt value is 3 at the beggining. But the first element’s index is 0, so when you declare in your for that i should be <= than itemCnt there is a javascript error because there is not a 4th item in the local database. So, your options are to declare your for either two ways:
for (i=0; i < itemCnt; i++) {
or
for (i=0; i <= itemCnt-1; i++) {
Hope this make sense. Let me know if you need the modified custom.js file.