Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Click delegation (cross browser API's not accounted for)
- document.addEventListener('click', function (e) {
- if (e.target.tagName.toLowerCase() === 'a' && e.target.href) {
- /* execute tracking logic */
- }
- }, false);
- // Click delegation with YUI 3
- Y.one('doc').delegate("click", function (e) {
- /* execute tracking logic */
- }, "a[href]");
Add Comment
Please, Sign In to add comment