• Is it possible to open a link from the image in a new window?
    I tried: target=”_blank” but that did not work.

Viewing 1 replies (of 1 total)
  • maciej007

    (@maciej007)

    Here’s a solution:

    <script>
    window.onload = function(){
      var anchors = document.getElementById('link_other').getElementsByTagName('a');
      for (var i=0; i<anchors.length; i++){
        anchors[i].setAttribute('target', '_blank');
      }
    }
    </script>

    EXAMPLE:

    <div id="link_other">
    [hover-image-row] 
    [hover-image-button title="Example title" subtitle="example subtitle" link="https://www.example.com" image="http://example-image.com"] 
    [/hover-image-row]
    </div>
    • This reply was modified 7 years ago by maciej007.
Viewing 1 replies (of 1 total)
  • The topic ‘open link in new window’ is closed to new replies.