Although I have imported materialize.js (v1.0.0) inside my plugin in WordPress with
$pluginpath = dirname (plugin_dir_url( __DIR__ ));
$pluginpath = str_replace('\\','/',$pluginpath);
$thepath = $pluginpath . '/js_libs/materialize.js';
wp_enqueue_script('wpunity_materialize_jslib', $thepath);
and in my main function
wp_register_script( 'wpunity_materialize_jslib', plugin_dir_url( __FILE__ ) . 'js_libs/materialize.js', null, null, false);
I keep getting
jQuery(...).material_chip is not a function
for this code
<div id="textarea-collaborators" class="chips-autocomplete"></div>
<script>
jQuery( document ).ready(function() {
jQuery('.chips-autocomplete').material_chip({
secondaryPlaceholder: 'Your collaborator email',
placeholder: 'Your collaborator email'
});
});
</script>