code: function() {
              if (this.first !== null) {
                  this.first = this.getItemIndex(this.$first);
                  this.setFocusableItem(this.$first);
              }
              else if (this.$items.length) {
                  this.setFocusableItem($(this.$items[0]));
              }
  
              if (this.$focusedItem) {
                  this.setFocusableItem(this.$focusedItem);
                  this.focusItem(this.$focusedItem);
              }
  
              if (this.last !== null) {
                  this.last = this.getItemIndex(this.$last);
              }
          }
docs: Update First/Last indexes