[jQuery] Re: get parent where
$(this).closest("div").attr("id")
[jQuery] Re: get parent where
I've went with a problem similliar to yours, a guy helped me out $(this).closest('.your-item').attr('id'); Try putting in your div a class named "your-item" like so, class="your- item" and then when you click on your span i think it wold give your div id, just try it :) Example: