I have a <div> that I would like to use as a link.
Is using JQuery’s data method to attach the URL I want to link to a ‘good practice’ way accomplish this?
Having a the <div> trigger a click event on a nested <a> tag was starting to get messy.
An alternative, if the
<a>is nested within the<div>you’re talking about:Though seeing more of your code would help to find the most optimal answer.