adding on click event for directory