Properly show or hide alert div