(rnkList, item, categ)
| 217 | |
| 218 | // getting the required index by loadNxt() |
| 219 | function getIndex(rnkList, item, categ) { |
| 220 | for (let i = 0; i < rnkLen[categ]; i++) { |
| 221 | if (rnkList[i][categ] === item) |
| 222 | return i; |
| 223 | } |
| 224 | return -1; // item absent |
| 225 | } |
| 226 | |
| 227 | // function(){loading the next set} |
| 228 | function loadNxt(clicked = img1, other = img2) { |