Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
3016 Näkymät

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
Hylkää
Paras vastaus

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
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
toukok. 23
5933
0
heinäk. 21
4108
0
kesäk. 21
4253
0
toukok. 23
3157
1
tammik. 23
7989