Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Use filename as a title for images in a Grid-Summary Block?


Cozimo

Question

As the title asks, I'm trying to avoid having to manually input the name of hundreds of images on my site.
I have used this code in the past and it works just fine with Gallery Blocks:
 
<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha384-vk5WoKIaW/vJyUAd9n/wmopsmNhiy+L2Z+SBxGYnUkunIxVxAv/UtMOhba/xskxh" crossorigin="anonymous"></script>
<script> window.Squarespace.onInitialize(Y, function(){
$('.slide img').each(function(i) {
$('.image-slide-title').eq(i).html('' + $(this).attr('alt').replace('.jpg', '') + '');
});
});
</script>
 
Any other suggestions would also be massively appreciated!
Link to post
  • Answers 2
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

2 answers to this question

Recommended Posts

  • 0

Summary Block use different class name. Can you share link to page where you use grid summary?

You can send your question to my email to get faster answer. / How to Setup Password & Share URL 

-- I'm Tuan, work for a non-profit project (build free libraries). I check the forum once or twice a day to help out the community. If you don't see me answering your question, you can send it to the email above. 

Link to post
  • 0
5 minutes ago, tuanphan said:

Summary Block use different class name. Can you share link to page where you use grid summary?

Here it is, it's currently just a test page right now and got a plugin called 'Universal Filter' injected.

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...