How do I get the parent div of that element e.target

Asked

Viewed 77 times

0

I tried like this and with .parent() but it did not give...

 $('.review' + reviewsArray[index] + '').one('webkitAnimationEnd oanimationend msAnimationEnd animationend',   
        function(e) {     
            $('.review' + reviewsArray[index] + '').appendTo('.reviews');
            $(e.target).closest("div").addClass('end');
});

1 answer

0

Try with e.target.parentElement or e.target.parentNode

Browser other questions tagged

You are not signed in. Login or sign up in order to post.