Tagged: _blank, hotspots, link target
Hi all,
I am looking for a way to have the hotspot links open in a new window/tab.
Any idea how this can be achieved? Maybe with a childtheme function?
Any help appreciated.
Kind regards,
Thomas
Hiya Yigit,
Still in development, running local with xampp.
Just want to know how to make hotspots with an external link, link in new window…
Cheers,
Thomas
Hey!
Please add following code to Functions.php file in Appearance > Editor
function add_custom_target(){
?>
<script>
jQuery(window).load(function(){
jQuery('.av-image-hotspot a').attr('target','_blank');
});
</script>
<?php
}
add_action('wp_footer', 'add_custom_target');
Regards,
Yigit
and thats why enfold is the best theme in the world!
thx, works like a charm, added an #id to it so it only happens on that specific hotspot image!
kind regards,
Thomas
The topic ‘Image with hotspots link target to _blank?’ is closed to new replies.