Add hidden class only once, fix bool checking in data attribute