jquery cousin element
- by salmane
I am trying to locate the closest element that contains a class....this is in an effort to find the "cousin" of the current element that i have..
the following did not work :
$('myelement').closest ('*:has(.class1)').find('class_cousin')
I am using the * in closest since i am not sure what type element is the one i am looking for nor do I know if it has any classes or ID ( i am trying to keep it general for a plugin)
any idea how I could do it?
thank you