In Jquery how do you find out the 'eq' of an element of what is being clicked?

前端 未结 4 1618
无人共我
无人共我 2021-02-05 01:49

When one of the divs inside \'uploadChoice\' is clicked, how can I ascertain which one is clicked? Can I return an \'eq\' value somehow?

 
4条回答
  •  情话喂你
    2021-02-05 02:32

    $('#uploadChoice div').click(function(event) {
      var index = $(this).index();
    });
    

提交回复
热议问题