Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

165
Visualizações
How can I upload MDBootstrap 5 PRO to my site?

I'm trying to upload the package a bit like installing via CDN, but I'm a fan and don't have a lot of knowledge on this. On the site there is the tutorial on how to install the package via NPM, but I have no idea what it is or how it works. I am looking for an easier solution, but I am not understanding how to load the MDB 5 Pro library.

What I did now was this:

  1. I uploaded the MD5 Pro package to my wordpress site directory
  2. I copied and pasted the example installation links via CDN
  3. I created a trivial select to see if MDB worked

What am I doing wrong ?

Fiddle: https://jsfiddle.net/snake93/9dger1b0/12/

<link href="https://motustrength.it/MDBootstrap-5-pro/css/mdb.min.css" rel="stylesheet">
<script type="text/javascript" src="https://motustrength.it/MDBootstrap-5-pro/js/mdb.min.js"></script>

 <select class="mdb-select md-form" searchable="Search here..">
  <option value="" disabled selected>Choose your car</option>
  <option value="2" data-secondary-text="Production year: 2012">Volkswagen Passat</option>
  <option value="3" data-secondary-text="Production year: 2017">Subaru Legacy</option>
  <option value="3" data-secondary-text="Production year: 2015">Hyundai Elantra</option>
  <option value="3" data-secondary-text="Production year: 2019">Honda Civic</option>
  <option value="3" data-secondary-text="Production year: 2016">Audi A6</option>
</select>
// Material Select Initialization
$(document).ready(function() {
$('.mdb-select').materialSelect();
});
about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

You need to import jQuery before MDB and other scripts. So, add this to your HTML code.

<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>

The final code looks like this.

<link href="https://motustrength.it/MDBootstrap-5-pro/css/mdb.min.css" rel="stylesheet">

<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>

<script type="text/javascript" src="https://motustrength.it/MDBootstrap-5-pro/js/mdb.min.js"></script>

 <select class="mdb-select md-form" searchable="Search here..">
  <option value="" disabled selected>Choose your car</option>
  <option value="2" data-secondary-text="Production year: 2012">Volkswagen Passat</option>
  <option value="3" data-secondary-text="Production year: 2017">Subaru Legacy</option>
  <option value="3" data-secondary-text="Production year: 2015">Hyundai Elantra</option>
  <option value="3" data-secondary-text="Production year: 2019">Honda Civic</option>
  <option value="3" data-secondary-text="Production year: 2016">Audi A6</option>
</select>
about 4 years ago · Juan Pablo Isaza Relatório

0

I did it myself. I realized that the Html code must be inserted before MDB Js. Also, I was using the wrong class for select, I was confused, I was using MDB 4's select class.

https://jsfiddle.net/snake93/9dger1b0/32/

<!-- MDB icon -->
<link rel="icon" href="img/mdb-favicon.ico" type="image/x-icon" />
    
<!-- Font Awesome -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.2/css/all.css" />
    
<!-- Google Fonts Roboto -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap" />
    
<!-- MDB CSS-->
<link rel="stylesheet" href="https://motustrength.it/MDB5-Pro/css/mdb.min.css" />

<!--your code here-->
  <select class="select" data-mdb-option-height="44">
            <option value="1" data-mdb-secondary-text="Secondary text">One</option>
            <option value="2" data-mdb-secondary-text="Secondary text">Two</option>
            <option value="3" data-mdb-secondary-text="Secondary text">Three</option>
            <option value="4" data-mdb-secondary-text="Secondary text">Four</option>
            <option value="5" data-mdb-secondary-text="Secondary text">Five</option>
          </select>

<!-- MDB JS-->
<script type="text/javascript" src="https://motustrength.it/MDB5-Pro/js/mdb.min.js"></script>
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda