I have an SVG on the following Elementor page: /
Most of the 'boxes' have # links to content further down the page. But, the 2 boxes labelled Services and Funding Solutions have relative links to other pages on the site.
The # links work, with no issues, but the relative links don't.
I'm aware that xlink:href is now depreciated, but it is still supported currently in most browsers.
I've tried change the xlink:href to just href, but that also doesn't work.
Thanks in advance for any help you can give me.
Rob
I have an SVG on the following Elementor page: https://ennovus.co.uk/technologies/
Most of the 'boxes' have # links to content further down the page. But, the 2 boxes labelled Services and Funding Solutions have relative links to other pages on the site.
The # links work, with no issues, but the relative links don't.
I'm aware that xlink:href is now depreciated, but it is still supported currently in most browsers.
I've tried change the xlink:href to just href, but that also doesn't work.
Thanks in advance for any help you can give me.
Rob
Share Improve this question asked Mar 25 at 11:18 Rob TyrrellRob Tyrrell 335 bronze badges 4 |1 Answer
Reset to default 1Relative links in embedded SVGs often break. Use JavaScript to handle clicks:
Give your "Services" and "Funding Solutions" SVG boxes unique
id
attributes.Add JavaScript to your Elementor page to:
a. Select these boxes by their IDs.
b. Add click listeners to them.
c. On click, use window.location.href = '/your-relative-link'; to navigate.
This is the most reliable way to make those links work.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744200853a4562870.html
click
handlers when I inspect the element on your live page.) – C3roe Commented Mar 25 at 11:25