Скажите, пожалуйста, как добавить
Почему у меня вылезает ошибка "(2) ["BX.ready error: ", TypeError: Cannot set property 'onClick' of undefined
at new JCTitleSearch "
| Код |
|---|
this.DROPDOWN_MENU_LI.onCl ick=function(callback){ alert("123");}
this.Init = function() {
this.CONTAINER = document.getElementById(this.arParams.CONTAINER_ID);
BX.addCustomEvent(this.CONTAINER, "OnNodeLayoutChange", this._onContainerLayoutChange); //инициализируем селекты this.SELECT_SECT=document.getElementById(this.arParams.SELECT_SECT_ID);
this.SELECT_LABEL=document.getElementById(this.arParams.SELECT_LABEL_ID);
//$(".dropdown_menu li")
this.DROPDOWN_MENU_LI=BX.findChild(BX.findChild("title-search",{"class":"dropdown_menu"}),{"tag":"li"}); ...
}
BX.ready(function (){_this.Init(arParams); _this.DROPDOWN_MENU_LI.onClick();}); |
Почему у меня вылезает ошибка "(2) ["BX.ready error: ", TypeError: Cannot set property 'onClick' of undefined
at new JCTitleSearch "