跳至內容
選單
此問題已被標幟
1 回覆
2925 瀏覽次數

I've got a problem in the widget when I defined the selector so the events are only called by children from selector element.

How can I search for elements (children) in the selector (parent element)? The selector is the ID of a form. Now I want to find all elements with specific class or all input elements.

    selector: '#ec_energy_input_form',

$(this).find('.form_control') gives me only undefined. 

 

頭像
捨棄
最佳答案

Hi,

To get the child element of the selector you can try 

this.$el.find('child_selector')

Example: 

this.$el.find('.form_control')

Regards

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
5月 23
5839
0
7月 21
4044
0
6月 21
4159
0
5月 23
3066
1
1月 23
7857