Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Accordion doesn't work


I'm working with Metronic 8.0.35 in my React app
I want to add an accordion element according to this example (just copied it):
https://preview.keenthemes.com/metronic8/react/demo1-docs/docs/accordion

But it doesn't work. Seems like it static and without Javascript


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (5)


Hi,

Try to use instead. All our styles will be fitted also.

Regards,
Keenthemes support



Seems Metronic is just a Bootstrap's wrapper and has nothing with React. Their demo for React uses the additional library for accordion..



I have the same problem, when I copy+paste code mentioned before nothing happend. What am I doing wrong?



Hi,

Code in code preview is everything that you need to use an accordion.

It will work without javascript, you just need to include bs attributes and classes to your element as it is shown in our doc:
https://preview.keenthemes.com/metronic8/react/demo1-docs/docs/accordion



Hi, same for me. I copied the content of this:

to end of e.g. dashboard page, and it does nothing.

My code is running Angular Demo1.

Can you please advise?


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(