Uses data attributes to route clicks to functions.