コンテンツへスキップ
メニュー
この質問にフラグが付けられました
4 返信
2203 ビュー

hello 

i am beginner in odoo 

i have three div have same class i want use this to call fun to one div only

thanks

アバター
破棄
最善の回答

Hi,

You can use ":eq(index)"

https://api.jquery.com/eq-selector/

https://api.jquery.com/nth-child-selector/



アバター
破棄
最善の回答

Hi, alice

You can try below code:

    $(this).on('click', ".classname", function () {});

Make sure it will helpful.

Thank you.

アバター
破棄

"i want to use this call fun to one div only" - yours does all.

$(this).on('click', ".classname:eq(<div index>)", function () {});