Attach close event trigger to <a> rather than <img>