JS: Open .js-img-hover image in a new tab on click

This commit is contained in:
Riyyi
2022-11-04 13:40:46 +01:00
parent d85fe1b75c
commit 20a8afa9ce
+6
View File
@@ -31,6 +31,12 @@ $(document).ready(function() {
$("#img-hover").remove(); $("#img-hover").remove();
}); });
// Image hover on click
$(".js-img-hover").click(function() {
var url = $(this).data("img-hover");
window.open(url, '_blank');
});
// Lazy load video's // Lazy load video's
$(window).on('resize scroll', function() { $(window).on('resize scroll', function() {
$('.js-video').each(function(index) { $('.js-video').each(function(index) {