mirror of
https://github.com/FunKey-Project/FunKey-Project.github.io.git
synced 2026-03-19 10:22:42 +01:00
reference lightbox images with alt tag
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
This commit is contained in:
@@ -2,8 +2,8 @@ $(document).ready(function () {
|
||||
let imageGroups = []
|
||||
$(".lightbox").each(function () {
|
||||
let imageSource = $(this).attr('src')
|
||||
let imageTag = $(this).attr('tag')
|
||||
let imageTitle = $(this).attr('title')
|
||||
let imageAlt = $(this).attr('alt').replace(/ /g,"")
|
||||
let imageTitle = $(this).attr('alt')
|
||||
if (imageTitle) {
|
||||
imageTitle = 'title="' + imageTitle + '" '
|
||||
}
|
||||
@@ -11,9 +11,9 @@ $(document).ready(function () {
|
||||
imageTitle = ''
|
||||
}
|
||||
$(this).
|
||||
wrap('<a class="boxedThumb ' + imageTag + '" ' +
|
||||
wrap('<a class="boxedThumb ' + imageAlt + '" ' +
|
||||
imageTitle + 'href="' + imageSource + '"></a>')
|
||||
imageGroups.push('.' + imageTag)
|
||||
imageGroups.push('.' + imageAlt)
|
||||
})
|
||||
jQuery.unique(imageGroups)
|
||||
imageGroups.forEach(imageGroupsSet)
|
||||
|
||||
Reference in New Issue
Block a user