jQuery FAQ Plugin – metisMenu.js

metisMenu Plugin is a javascript library that allows creating a collapsible menu with animated accordion effects and auto collapse support. You can use Event handlers in this plugin.

Features:

  • Fully responsive and works great on every device (Desktop, Tablet, Mobile)
  • Collapse/expand animations.
  • Event handlers.

Live Demo

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

How to Use

Add the css below to your html page

<link rel="stylesheet" href="http://onlinefreetools.net/wp-content/uploads/bootstrap4/bootstrapcustom.min.css" />
<link rel="stylesheet" href="http://onlinefreetools.net/wp-content/uploads/demo/menu/metismenu/css/metisMenu.min.css" />
<style>
  .faq-link {
    cursor: pointer;
    padding: 15px;
    background: #212529;
    color: #adb5bd !important;
  }

  .faq-item.active>.faq-link {
    background-color: #d9480f;
    color: #f8f9fa;
  }
</style>

Create a container where you want to render FAQ

<div class="container">

  <div class="metismenu faq-menu">

    <div class="faq-item mb-2">
      <h4 class="faq-link has-arrow">Question 1</h4>
      <div class="faq-answer text-muted">
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
        dolore magna aliqua.
      </div>
    </div>

    <div class="faq-item mb-2">
      <h4 class="faq-link has-arrow">Question 2</h4>
      <div class="faq-answer text-muted">
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
        dolore magna aliqua.
      </div>
    </div>

    <div class="faq-item mb-2">
      <h4 class="faq-link has-arrow">Question 3</h4>
      <div class="faq-answer text-muted">
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
        dolore magna aliqua.
      </div>
    </div>

    <div class="faq-item mb-2">
      <h4 class="faq-link has-arrow">Question 4</h4>
      <div class="faq-answer text-muted">
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
        dolore magna aliqua.
      </div>
    </div>

    <div class="faq-item mb-2">
      <h4 class="faq-link has-arrow">Question 5</h4>
      <div class="faq-answer text-muted">
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
        dolore magna aliqua.
      </div>
    </div>

    <div class="faq-item mb-2">
      <h4 class="faq-link has-arrow">Question 6</h4>
      <div class="faq-answer text-muted">
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
        dolore magna aliqua.
      </div>
    </div>

  </div>

</div>

Load jQuery library together with the jQuery FAQ library into your code

<script src="http://onlinefreetools.net/wp-content/uploads/demo/menu/metismenu/js/hor_metisMenu.min.js"></script>
<script>
  $(function () {
    $('.faq-menu').metisMenu({
      toggle: false,
      triggerElement: '.faq-link',
      parentTrigger: '.faq-item',
      subMenu: '.faq-answer'
    });
  });
</script>

Source Code

Download

For more Advanced Usages, please check the demo page or visit the official website.