I want to add image-maps, images with multiple clickable links that when clicked go to the linked section of my Twine story. The links in the image would be similar to the standard twine links (e.g., [[Go to Room 1->room1]]).
The code I tried was:
<img
src="test image.jpeg"
alt="" usemap="#example-map-1" class="x" />
<map name="example-map-1">
<area shape="rect" coords="708, 3, 861, 763"
href="" alt="sun" />
</map>
which is how you do it in HTML (I tested it and it works there), but Twine appears to have no support for 'href' attributes because there is no url with which to link to another section of the story.
tl;dr Trying to do is get the 'href' in HTML to be a twine-style link to another 'page' of the story. What can I do?
EDIT: I tried these bits of code found elsewhere. Now, when I mouse over the specified part of the image it turns into a link (cursor becomes hand), but when clicked does nothing, doesn't go to the specified passage. What's wrong here?
<div style="display: none;">
[[choke->choke]]
</div>
<script>
$('area[alt="sun"]').on("click", function(e){
e.preventDefault();
$("tw-link[passage-name='choke']").click();
});
</script>