Hide preview div when there is no preview to be displayed