DO NOT DELETE

/******************* GA ********************/
/**********************************************/


/******************* Enqueuing JS and Dashicons ********************/
/**********************************************/
add_action( ‘wp_enqueue_scripts’, function() {

wp_enqueue_style( ‘dashicons’ );

} );

function wpa_enqueue_scripts() {
wp_enqueue_script( ‘modalImage.js’, get_theme_file_uri( ‘assets/js/modalImage.js’ ), [], null, true );
}

add_action( ‘wp_enqueue_scripts’, ‘wpa_enqueue_scripts’, 100 );

/******************* MODAL ********************/
/**********************************************/
// create references to the modal…
var modal = document.getElementById(‘myModal’);
// to all images — note I’m using a class!
var images = document.getElementsByClassName(‘myImages’);
// the image in the modal
var modalImg = document.getElementById(“img01”);
// and the caption in the modal
var captionText = document.getElementById(“caption”);

// Go through all of the images with our custom class
for (var i = 0; i < images.length; i++) {
var img = images[i];
// and attach our click listener for this image.
img.onclick = function(evt) {
modal.style.display = “block”;
modalImg.src = this.src;
captionText.innerHTML = this.alt;
}
}

var span = document.getElementsByClassName(“close”)[0];

span.onclick = function() {
modal.style.display = “none”;
}

/******************* MODAL Class and Modal HTML ********************/
/**********************************************/

Australian Mountain Dog – Penny