Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Semantic UI Accordion not working properly

I have an accordion element in my page. The problem is that the accordion appears on the page but it is not clickable. By 'not clickable', I mean that when I click on the header it does not expand to reveal the contents. Nothing happens at all. I hope someone can help.

Thanks in advance.

like image 938
Fᴀʀʜᴀɴ Aɴᴀᴍ Avatar asked Jun 07 '15 17:06

Fᴀʀʜᴀɴ Aɴᴀᴍ


1 Answers

Your jQuery.js module must be loaded before the semantic-ui accordion.js module.

Simply put

<script src="js/accordion.js"></script>

after

<script src="js/vendor/jquery-1.11.2.min.js"><\/script>

( or whatever your jQuery version is ... )

and initialize the accordion in the html document inside a script tag as :

<script language='javascript'>
             $(document).ready(function(){
                $('.ui.accordion').accordion();
             });
</script>
like image 194
Biraj Bora Avatar answered Oct 06 '22 02:10

Biraj Bora