refactored, use ng-hide instead of jquery hide()