From 88c5a4c2fadfcfc4f254aeb6050603cfa54b203b Mon Sep 17 00:00:00 2001 From: W Etheredge Date: Sat, 28 Oct 2017 02:11:46 +0100 Subject: [PATCH] Documentation update (getting tabs by position) --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9ad9e82..508280f 100644 --- a/README.md +++ b/README.md @@ -86,9 +86,17 @@ Add a new tab to the tab group and returns a `Tab` instance. * `active` (default: `false`): set this to `true` if you want to activate the tab once it is loaded. Otherwise you will need to call `tab.activate()`. * `ready`: a callback function to call once the tab is ready. The `Tab` instance is passed as the only parameter. -#### `tabGroup.getTab(id)` +#### `tabGroup.getTab(id, idIsPosition)` -Retrieve an instance of `Tab` from its `id` (return `null` if not found). +If `idIsPosition` is true `id` is passed to `tabGroup.getTabByPosition`. Otherwise, `id` is passed to `tabGroup.getTabById`. + +#### `tabGroup.getTabById(id)` + +Retrieve an instance of `Tab` from this `id` (return `null` if not found). + +#### `tabGroup.getTabByPosition(position)` + +Retrieve an instance of `Tab` from this `position` (return `null` if not found). #### `tabGroup.getActiveTab()`