Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
2906 Tampilan

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. 

 

Avatar
Buang
Jawaban Terbai

Hi,

To get the child element of the selector you can try 

this.$el.find('child_selector')

Example: 

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

Regards

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
1
Mei 23
5806
0
Jul 21
4020
0
Jun 21
4129
0
Mei 23
3027
1
Jan 23
7836