Im trying to make a hyperlink with 2 different links where for desktop version it would be lets say:
<code><a class="dynamic-link" href="www.test.sk/desktop">Link</a>
</code>
<code><a class="dynamic-link" href="www.test.sk/desktop">Link</a>
</code>
<a class="dynamic-link" href="www.test.sk/desktop">Link</a>
and for mobile version it will be:
<code><a class="dynamic-link" href="www.test.sk/mobile">Link</a>
</code>
<code><a class="dynamic-link" href="www.test.sk/mobile">Link</a>
</code>
<a class="dynamic-link" href="www.test.sk/mobile">Link</a>
im pretty sure, it can be done by javascript, but im looking for some efficient way, so i can apply this to multiple hyperlinks with different classes etc.
I tried it with some media queries through javascript, but it was too complex
New contributor
Marcel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.