Dynamically execute client-side scripts based on DOM attributes