UNPKG

way2web-tabs

Version:

General tabs, store the last open tab.

51 lines (33 loc) 1.05 kB
# W2Tabs [![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] With this function you can add more functions to the tabs. You can add the functions like: ``` var prefix = 'w2w_tab_'; var test = new W2Tabs(element, prefix).init(); ``` Now you can open a tab manual with: ``` test.open('#details') ``` ## NPM Install using npm: ``` $ npm install --save way2web-tabs ``` ## Test the package. To test the package, clone the package to your system. Than run this command. ``` npm run build ``` This will copy the test files to the dist, and also build the package files include the dependencies. When this script is complete without errors, you can open `dist/index.html` in your browser. Open the dev tools, tab console, and you see all the results of the tests. If you only want to check the eslint rules, just run. ``` npm run lint ``` [downloads-image]: https://img.shields.io/npm/dm/way2web-tabs.svg [npm-url]: https://www.npmjs.com/package/way2web-tabs [npm-image]: https://img.shields.io/npm/v/way2web-tabs.svg