Stuck on the basic JS, but can't find the issue.

Stuck on the basic JS, but can't find the issue.

Hi guys,

Could you please see this codepen:  http://codepen.io/anon/pen/xEmfv

It's quite simple what I want to achieve, but I can't get it to work. 

The main idea is, when class="attribute" is empty then hide/remove parent with class="attr".

Simple right? But I'm stuck for few hours now. 

Sorry for novice question, but I need solution ASAP.

Thanks guys,