It seems that events bubbling approach can be used here instead of querying for all links with a specific attribute on DOMReady.