how can i get immediate parent of a given element ?
$(e.target).parent() ?
$(element).parent()
returns the immediate parent.
$("#my-button").click(function() {
var parentElement = $(this).parent();
// etc...
});
http://docs.jquery.com/Traversing/parent
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With