Making resultsList function for click event that show detail