Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
ay-accordion
Advanced tools
A mobile-friendly, jank-free accordion directive for Angular 1.x.
Copyright © 2016 Ayogo Health Inc.
To get started, install the package from npm: npm install ay-accordion
.
Add a script tag to your page to reference the accordion.js file:
<script src="node_modules/ay-accordion/dist/accordion.js"></script>
Reference the module in your Angular app's dependencies:
angular.module(myApp, ['ayAccordion'])
Install the browserify-ngannotate transform:
npm install browserify-ngannotate
Reference the module in your Angular app's dependencies:
var ayAccordion = require('ay-accordion').default;
angular.module(myApp, [ayAccordion])
Reference the module in your Angular app's dependencies:
import ayAccordion from 'ay-accordion';
angular.module(myApp, [ayAccordion])
A TypeScript module definition is included.
<div ay-accordion-root multiple>
<div ay-accordion open on-toggle="ctrl.accordionToggle(state)">
<b ay-accordion-header>Panel 1 (Click to open)</b>
<div>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</div>
</div>
</div>
This directive wraps the entire accordion, as well as any content below the accordion that needs to be pushed down when accordion sections open and close.
multiple
: This attribute allows multiple accordion sections to be open at
the same time (default is only a single section expanded at a time).This directive manages a single expanding/collapsing accordion section, including the title content shown when it is collapsed.
open
: This attribute will make the section expanded by default. You can
also use ng-open
to set this attribute dynamically.
on-toggle
: This attribute specifies a callback function to be run when the
section is expanded or collapsed. The state
argument is a boolean
representing if the section is open.
This directive wraps the title of the accordion section, and attaches the event handlers to expand the section when clicked.
For the accordion to expand/collapse as intended, you'll need to add something like the following to your stylesheet:
[hidden] {
display: none;
}
[ay-accordion] {
overflow: hidden;
height: 30px;
}
[ay-accordion][open] {
height: auto;
}
Released under the terms of the MIT License.
This project would not have happened without the knowledge and support of Ada Rose Edwards, in particular the following two posts:
FAQs
ayAccordion ===========
The npm package ay-accordion receives a total of 39 weekly downloads. As such, ay-accordion popularity was classified as not popular.
We found that ay-accordion demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.