Custom Collection Viewer Problem

I added an press event handler to collection as a js query: