How to find the second closest div?
For example, to get the closest, I successfully use:
var closest_div_id = $(this).closest('div').attr('id');
Now, how do I get the second nearest? Sort of:
$(this).(closest('div').closest('div')).attr('id'); ???
source
share