Topic: Sidebar accordion not workin [MDB JQuery]
agustrom_mar
pro
asked 7 years ago
<ul class="collapsible collapsible-accordion"> <li> <a class="collapsible-header waves-effect arrow-r""> <i class="fa fa-chevron-right"></i> Buscar <i class="fa fa-angle-down rotate-icon"></i> </a> <div class="collapsible-body" > <ul class="list-unstyled"> <li><a :href="url_buscar_aporte" class="waves-effect"> <i class="fa fa-search"></i> Buscar aporte </a></li> <li><a :href="url_buscar_usuario" class="waves-effect"> <i class="fa fa-search"></i> Buscar compañero </a></li> </ul> </div> </li>
Jakub Mandra
staff
answered 7 years ago
agustrom_mar
pro
answered 7 years ago
Jakub Mandra
staff
answered 7 years ago
agustrom_mar
pro
answered 7 years ago
I have a laravel blade layout where i load all libraries of MDBootstrap (jquery, bootstrap, mdbootstrap, popper).
I load both css and js.
I also load vuejs library from cdn and i have a app-core.js where i have the main Vue object thats includes the other vue components.
I let you a sample code...
I hope you can help me. Thanks for now
Start your code here
<body style="margin:0px">
@yield("content")
<div id="app" class="yb">
<header>
<sidebar url_log = "{{URL::asset('logo/3.0/logo.letras blancas.compressed.png')}}"> </sidebar>
<navbar url_log = "{{URL::asset('logo/3.0/logo.letras blancas.compressed.png')}}"> </navbar>
</header>
<main class="" id="content_yield">
<div class="container">
@yield("vue_content")
</div>
</main>
</div>
<!-- Carga de Estilos -->
<!-- Font Awesome -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
{{-- Material Design Bootstrap --}}
<link rel="stylesheet" href="{{URL('MDB-Pro-4.5.7/css/mdb.min.css')}}">
<!-- Bootstrap core CSS -->
<link href="{{ elixir('bootstrap-4-sectorizado/bootstrap-4-sectorizado.css') }}" rel="stylesheet">
<!-- FIN Carga de Estilos -->
<!-- Carga de Scripts -->
@if(get_from_env('APP_PRODUCTION'))
{{-- Vue 2 from CDN - version produccion --}}
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.min.js"></script>
@else
{{-- Vue 2 from CDN - version desarrollo --}}
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script>
@endif
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js" charset="utf-8"></script>
<!-- SCRIPTS -->
<!-- JQuery -->
<script type="text/javascript" src="{{URL('MDB-Pro-4.5.7/js/jquery-3.3.1.min.js')}}"></script>
<!-- Tooltips -->
<script type="text/javascript" src="{{URL('MDB-Pro-4.5.7/js/popper.min.js')}}"></script>
<!-- Bootstrap core JavaScript -->
<script type="text/javascript" src="{{URL('MDB-Pro-4.5.7/js/bootstrap.min.js')}}"></script>
<!-- MDB core JavaScript -->
<script type="text/javascript" src="{{URL('MDB-Pro-4.5.7/js/mdb.min.js')}}"></script>
Jakub Mandra
staff
answered 7 years ago
Hello,
It’s an unusuall aproach 🙂
I tested your code with JQuery and it worked ok, after cleaning some typos.
<a class="collapsible-header waves-effect arrow-r"">
<a class="collapsible-header waves-effect arrow-r">
Can I ask you how do you connect both libraries? It will help with further support.
Also I must tell you, that we do not support use-cases of libraries in other frameworks, but we will do as much as we can to help.
Regards,
Jakub from MDB
agustrom_mar pro commented 7 years ago
Thanks for the answer. I have noticed that when i click on collapsible-header, the mdbootstrap js is not setting to class "active" the li tag inside the ul with class="collapsible collapsible-accordion"FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Pro
- Premium support: No
- Technology: MDB jQuery
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No