JavaScript
Article
By Sam Deering

jquery get parent element with specific class

By Sam Deering

Quick jQuery snippet to get parent elements with specific class.

--ADVERTISEMENT--

var container = $(this).parents('.item');
Recommended
Sponsors
Get the latest in JavaScript, once a week, for free.