Skip to content

Instantly share code, notes, and snippets.

@luishdez
Created October 22, 2012 09:01
Show Gist options
  • Select an option

  • Save luishdez/3930474 to your computer and use it in GitHub Desktop.

Select an option

Save luishdez/3930474 to your computer and use it in GitHub Desktop.
testdoc.js
// GOOD
DashboardTab.prototype = {
/**
* @type {DashboardTab} The tab object
*/
constructor: DashboardTab,
/**
* @type {DashboardTab} The tab object
*/
parentObj: null,
// BAD
DashboardTab.prototype = {
/**
* the nav-tabs object
* @type {DashboardTabs}
*/
constructor: DashboardTabs,
/**
* the tab with the focus in
* @type {?DashboardTab}
*/
tabFocused: null,
/**
* the number maximum of tabs in nav
* @type {Number}
*/
maxTabs: 5,
/**
* Set a title in the tab
*
* ### Examples:
*
* ```javascript
* $('.tab:first').dashboardTab('setTitle', 'Menu');
* ```
*
* - Remove the focus on all users, and set the focus in the first user.
* - Other element on the list
*
* @method {setTitle}
* @this {dashboardTab}
* @param {string} title - The title of the tab
*
* @return {void}
*/
setTitle: function (title) {
this.element.find('a').text(title);
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment