Materializecss Autocomplete does not create a drop down list?

connects to the header
$this->registerJsFile('/frontend/web/js/custom/search/liveSearch.js', ['position' => yii\web\View::POS_END]);

 public $baseUrl = '/frontend/web';
 public $css = [
 public $js = [
 'js/vendor.js?rel=1534423934865', //materualize in the Assembly
 public $depends = [

In the end, displays this error this.dropdownEl is null;
$(function () {
 $('#search').autocomplete({data: {"apple":null, "appstore":null, "appetize":null}});
March 19th 20 at 08:49
1 answer
March 19th 20 at 08:51
1. what's yii? The issue in the context of js.
2. in what file and what a mistake this.dropdownEl is null;?
3. try povangovat. You have no element with an id of "search", check this:
$(function () {
 var myEl = $('#search');
@keshawn.Grimes, search is. The problem is yii, because separately in the file layout works, but in yii not. - jaida commented on March 19th 20 at 08:54
the problem is yii because separately file with layout in yii not working

??? Read five times, did not understand. - keshawn.Grimes commented on March 19th 20 at 08:57
@jaida, problems in yii there. there is a problem with the incorrect use yii =) - Aryanna_Schuster commented on March 19th 20 at 09:00

Find more questions by tags JavaScript