Posts

Showing posts with the label accordion

Open jQuery accordion panel with link (outside of acccordion)

Open jQuery accordion panel with link (outside of acccordion) Still new to jQuery! I have an accordion that was built with the jQuery UI 1.10.1. It's pretty basic; the first item is showing by default, and the others are hidden until clicked on. I'd like to use links that exist above a jQuery accordion to open a certain accordion panel when clicked. It looks something like this: Link1 Link2 Link3 | Accordion Header 1 | | Accordion content 1 showing| | Accordion Header 2 | | Accordion content 2 hidden | | Accordion Header 3 | | Accordion content 3 hidden | ..so that when you click on "Link2", it hides Accordion content 1 and shows Accordion content 2. I've searched the site and none of the answers seemed fitting. Thanks Please make a demo of your HTML at jsFiddle.net – Seder Feb 20 '13 at 23:06 ...

How to use ngFor for an accordion to loop multiple times in Angular

How to use ngFor for an accordion to loop multiple times in Angular I have the below code for creating accordion using plus and minus icons. I have handled the toggle functionality as well. But now I want to loop this inside ngFor for multiple set of elements . I am not sure how to do this. Basically i have a resultArray which is a json . I need to loop through resultArray json to get the heading and description and place it as accordion heading and accordion description. I am not sure how to replace the accord.id dynamically. <div *ngFor = "let resulArray of resultArray"> <div *ngFor="let accord of accordian;"> <div (click)="toggle(accord.id)" id="accordionTitle{{accord.id}}" class="accordionTitle active">{{accord.label}} <i class="fa fa-minus" id="minus{{accord.id}}"></i> </div> <div id="{{acco...