MCPcopy Create free account
hub / github.com/aspnet/AzureSignalR-samples / to

Method to

aspnet-samples/AspNetForm/Scripts/bootstrap.js:1233–1248  ·  view source on GitHub ↗
(index)

Source from the content-addressed store, hash-verified

1231 this.cycle();
1232 }
1233 to(index) {
1234 const items = this._getItems();
1235 if (index > items.length - 1 || index < 0) {
1236 return;
1237 }
1238 if (this._isSliding) {
1239 EventHandler.one(this._element, EVENT_SLID, () => this.to(index));
1240 return;
1241 }
1242 const activeIndex = this._getItemIndex(this._getActive());
1243 if (activeIndex === index) {
1244 return;
1245 }
1246 const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV;
1247 this._slide(order, items[index]);
1248 }
1249 dispose() {
1250 if (this._swipeHelper) {
1251 this._swipeHelper.dispose();

Callers 2

jQueryInterfaceMethod · 0.45
bootstrap.jsFile · 0.45

Calls 4

_getItemsMethod · 0.95
_getItemIndexMethod · 0.95
_getActiveMethod · 0.95
_slideMethod · 0.95

Tested by

no test coverage detected