Jump to content

CNGrobler

Members
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

CNGrobler's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. CNGrobler

    JS image

    I need this code to not open the image in a new window, but rather to display the image on the same page? <style>.elementor-gallery-title{cursor: pointer;} </style> <script> 'use strict'; document.addEventListener('DOMContentLoaded', function () { var filteredImages = document.querySelectorAll('.elementor-gallery-title'); //Edit the links HERE var links = [ 'https://wendyhomesmdb.co.za/wp-content/uploads/2020/04/IMG-20150624-WA0005.jpg', 'https://wendyhomesmdb.co.za/wp-content/uploads/2020/04/20150703_160201.jpg', 'https://wendyhomesmdb.co.za/wp-content/uploads/2020/04/DeckAwning3.jpg.png', 'https://wendyhomesmdb.co.za/wp-content/uploads/2020/04/IMG-20140604-WA004.jpg' ]; var _loope = function _loope(i) { filteredImages.addEventListener('click', function () { location = links; }); } for (var i = 0; i < filteredImages.length; i++) { _loope(i); } }); </script>
  2. CNGrobler

    Coert

    I need this code to not open the image in a new window, but rather to display the image on the same page? <style>.elementor-gallery-title{cursor: pointer;} </style> <script> 'use strict'; document.addEventListener('DOMContentLoaded', function () { var filteredImages = document.querySelectorAll('.elementor-gallery-title'); //Edit the links HERE var links = [ 'https://wendyhomesmdb.co.za/wp-content/uploads/2020/04/IMG-20150624-WA0005.jpg', 'https://wendyhomesmdb.co.za/wp-content/uploads/2020/04/20150703_160201.jpg', 'https://wendyhomesmdb.co.za/wp-content/uploads/2020/04/DeckAwning3.jpg.png', 'https://wendyhomesmdb.co.za/wp-content/uploads/2020/04/IMG-20140604-WA004.jpg' ]; var _loope = function _loope(i) { filteredImages.addEventListener('click', function () { location = links; }); } for (var i = 0; i < filteredImages.length; i++) { _loope(i); } }); </script>
×
×
  • Create New...