I need to add descriptions to a gallery carousel without having it visible on the main gallery. Is there any way to tweak the code to exclude descriptions on the main gallery? So far, I've only found additional code which adds a description in both places:
Amazing, it works! Thank you!! 🙏
Now the only slight issue is the 'echo' when flipping through the carousel. I've attached a screen recording. Any chance you know how to fix that?
Screen Record
Question
F-RAVN 1
I need to add descriptions to a gallery carousel without having it visible on the main gallery. Is there any way to tweak the code to exclude descriptions on the main gallery? So far, I've only found additional code which adds a description in both places:
<script>
/**
* Add descriptions/captions to galleries in Squarespace 7.1.
* JavaScript
* © @brandon (Squarespace Forum User)
* This software is provided "as is", without warranty of any kind, express or implied.
*/
document.addEventListener("DOMContentLoaded", function() {
addGalleryItemDescriptions();
function addGalleryItemDescriptions(gs, gdzs) {
var a=['querySelectorAll','section.gallery-section,\x20.gallery-lightbox','length','[class*=\x27-item\x27]:not([class*=\x27item-\x27])','getElementsByTagName','img','alt','trim','createElement','div','className','gallery-item-description','textContent','appendChild'];var b=function(c,d){c=c-0x0;var e=a[c];return e;};(function(c,d){var e,f,g,h,i,j,k;e=document[b('0x0')](c?c:b('0x1'));i=e[b('0x2')];while(i--){f=e[i][b('0x0')](d?d:b('0x3'));j=f[b('0x2')];while(j--){g=f[j][b('0x4')](b('0x5'))[0x0][b('0x6')][b('0x7')]();if(g){h=document[b('0x8')](b('0x9'));h[b('0xa')]=b('0xb');h[b('0xc')]=g;f[j][b('0xd')](h);}}}}(gs,gdzs));
}
});
</script>
Link to post
Top Posters For This Question
2
1
1
1
Popular Days
Oct 28
2
Oct 29
2
Nov 3
1
Top Posters For This Question
F-RAVN 2 posts
bangank36 1 post
inunzi 1 post
ibisette 1 post
Popular Days
Oct 28 2020
2 posts
Oct 29 2020
2 posts
Nov 3 2020
1 post
Popular Posts
F-RAVN
Amazing, it works! Thank you!! 🙏 Now the only slight issue is the 'echo' when flipping through the carousel. I've attached a screen recording. Any chance you know how to fix that? Screen Record
Posted Images
4 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment