jquery get parent element with specific class

Sam Deering
Share

Quick jQuery snippet to get parent elements with specific class.

var container = $(this).parents('.item');