Akryum / meteor-vue2-example

Meteor & Vue 2.0 example
44 stars 22 forks source link

Uncaught TypeError: $(...).material_select is not a function #6

Open mingliang7 opened 7 years ago

mingliang7 commented 7 years ago

Recently I have tried Materializecss in your meteor-vue2-example project and when i initialize material select it show error like Uncaught TypeError: $(...).material_select is not a function

-html-head
  <link rel="stylesheet"href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.0/css/materialize.min.css">

-html-body
  <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.0/js/materialize.min.js"></script>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>

-App.vue
 <div class="input-field">
      <select>
      <option>Test</option>
    </select>
    <label for="">Materialize Select</label>
   </div>
-js
mounted(){
       $(this.$el).find('select').material_select();

  }
ramonrdm commented 7 years ago

Did you find a solution?