mirror of
https://github.com/FunKey-Project/FunKey-Project.github.io.git
synced 2025-12-12 18:28:51 +01:00
25 lines
764 B
JavaScript
25 lines
764 B
JavaScript
$(document).ready(function () {
|
|
let productImageGroups = []
|
|
$('.img-fluid').each(function () {
|
|
let productImageSource = $(this).attr('src')
|
|
let productImageTag = $(this).attr('tag')
|
|
let productImageTitle = $(this).attr('title')
|
|
if (productImageTitle) {
|
|
productImageTitle = 'title="' + productImageTitle + '" '
|
|
}
|
|
else {
|
|
productImageTitle = ''
|
|
}
|
|
$(this).
|
|
wrap('<a class="boxedThumb ' + productImageTag + '" ' +
|
|
productImageTitle + 'href="' + productImageSource + '"></a>')
|
|
productImageGroups.push('.' + productImageTag)
|
|
})
|
|
jQuery.unique(productImageGroups)
|
|
productImageGroups.forEach(productImageGroupsSet)
|
|
|
|
function productImageGroupsSet (value) {
|
|
$(value).simpleLightbox()
|
|
}
|
|
})
|