1.2.3 • Published 6 years ago

jean-collapsible v1.2.3

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

Description

Provides a collapsible control

Support

Supports both CommonJS and AMD eco system. If there is no loader, Collapsible is registered as a browser variable.

Code Example

  • Use it as browser variable
var obj = new Collapsible({
    heading: "CollapsibleName",
    isCollapsed: true
});
  • Use it with require.js
require(["path/to/Collapsible"], function(Collapsible){
    // Work with Collapsible
});

Installation

npm install jean-collapsible --save --legacy-bundling

API Reference

Options

  • heading: Boolean - mandatory - the heading
  • isCollapsed: Boolean - optional - True if collapsible is collapsed, false otherwise

Collapsible.add(id, name)

Adds an element to the collapsible

Parameters

  • id: String - id of the element
  • element: HTMLElement - the html element which shall be added

Returns

  • Boolean - True, if the element is added, exception otherwise

Collapsible.remove(id)

Removes an element from the collapsible

Parameters

  • id: String - id of the element to be removed

Returns

  • Boolean - True, if the element is removed, false otherwise

Tests

  • Open spec/spec-runner.html in browser to see the test cases.

License

MIT

1.2.3

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago