Norwegian version of this page

Accordion

The accordion component is used when you have many paragraphs in a text and where the users will mainly only select one of them.

How the accordion works:

Accordion can be used on both articles and front pages, but is adjusted by page width so it looks smaller in an article. This is controlled by the template and can not be overridden.

This is what an accordion looks like:

Det humanistiske fakultet

  • Fakultetsadministrasjonen
  • Institutt for arkeologi, konservering og historiske studier - IAKH
  • Institutt for filosofi, ide- og kunsthistorie og klassiske språk - IFIKK
  • Institutt for kulturstudier og orientalske språk - IKOS
  • Institutt for lingvistiske og nordiske studier - ILN
  • Institutt for litteratur, områdestudier og europeiske språk - ILOS
  • Institutt for medier og kommunikasjon - IMK
  • Institutt for musikkvitenskap - IMV
  • Centre for the Study of MInd in Nature - CSMN
  • Senter for flerspråklighet
  • Senter for Ibsenstudier
  • Det norske institutt i Roma
  • Det norske universitetssenter i St.Petersburg
  • Senter for fransk-norsk forskningssamarbeid innenfor samfunnsvitenskap og humaniora

Det juridiske fakultet

  • Fakultetssekretariatet
  • Institutt for kriminologi og rettsosiologi
  • Institutt for offentlig rett
  • Institutt for privatrett
  • Nordisk institutt for sjørett
  • Norsk senter for menneskerettigheter
  • Senter for europarett

Det matematisk-naturvitenskapelige fakultet

  • Fakultetssekretariatet
  • Institutt for teoretisk astrofysikk
  • Institutt for biovitenskap
  • Farmasøytisk institutt
  • Fysisk institutt
  • Institutt for geofag
  • Institutt for informatikk
  • Kjemisk institutt
  • Matematisk institutt
  • Senter for akseleratorbasert forskning og energifysikk - SAFE
  • Physics of Geological Processes - PGP
  • Centre for Ecological and Evolutionary Synthesis - CEES
  • Senter for entreprenørskap - SFE
  • Senter for innovative naturgassprosesser og produkter - inGAP
  • Senter for materialvitenskap og nanoteknologi - SMN
  • Centre of Matematics for Applications - CMA
  • Centre for Theretical and Computational Chemistry - CTCC

 

How to create an accordion:

  1. Set the code around the title of the paragraph. Select h2 or h3 as follows:
  2. Code:
    <h3 class="accordion">Tittel</h3>
     
    
  3. Repeat on all titles you want to include in the accordion view

Direct link:

  • If you want a direct link that opens a paragraph, you can in addition add an ID to the h2 or h3, like so:
  • <h3 class="accordion" id="odont-fak">Det odontologiske fakultet</h3>

Text under the accordion

  • If you want to insert the feedback feature in the accordion, you must add a blank <h2> in the source code before the text.
  • Like this:  <h2>&nbsp;</h2>
  • If you don't do this, the feedback feature will be placed in the bottom tab of the accordion.
Published Jan. 25, 2022 7:08 AM - Last modified Mar. 4, 2022 10:00 AM