Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
3008 มุมมอง

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
พ.ค. 23
5925
0
ก.ค. 21
4103
0
มิ.ย. 21
4237
0
พ.ค. 23
3153
1
ม.ค. 23
7984