콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
4 답글
2222 화면

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 () {});