Firstly, you need to use the .
prefix in your class selector. However, what you have is looking for the parent .content
element, yet it is a sibling of a parent and hence will not be found.
Try this:
$(this).closest('.tabs').find('.tabed_contents').removeClass('show');
Alternatively, you could go to .header
and find the sibling .content
.
$(this).closest('.header').siblings('.tabed_contents').removeClass('show');
To not hide all the .tabed_contents
use this:
$(this).closest('.tabs').find('.tabed_contents').hide();