Quick jQuery snippet to get parent elements with specific class. var container = $(this).parents('.item'); https://www.sitepoint.com/jquery-parent-element-specific-class/ Related posts: jQuery: Submit Form If at Least One Checkbox is Checked jQuery: Reset & Clear Form How to Read and Parse JSON String in jQuery and Display in HTML Table jQuery: .find and .closest at Their Best.