Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8391325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:13:51+00:00 2026-06-09T19:13:51+00:00

I am using Galleria (classic) and I can’t get it to add custom description

  • 0

I am using Galleria (classic) and I can’t get it to add custom description on images.
Otherwise the gallery works fine, only I see the img file name in caption.

I’m trying to use the dataConfig function – http://galleria.io/docs/options/dataConfig/. I am not that good at JavaScript so I can’t really see what I’m doing wrong.

My code:

 <div id="galleria">
   <% for image in @trip.images %>  
   <%= link_to image_tag(image.image.url(:thumb)), image.image.url(:large) %> 
 <span class="desc"> <%= image.title %>  </span>
   <% end %>
</div>
<script>

    Galleria.run('#galleria');
    Galleria.configure({
         minScaleRatio: 1.5,
         maxScaleRatio: 3,
         dataConfig: function(img) { return { description: $(img).next('.desc').html() }; }

   });

</script>
</div>

Can You please help ?
Thank you!

Update: generated HTML code

 <div id="galleria">
   <a  href="http://s3.amazonaws.com/Thrill/images/439/large/14d8868ac166ce1.54701969.JPG?1326357617"><img alt="14d8868ac166ce1.54701969" src="http://s3.amazonaws.com/Thrill/images/439/thumb/14d8868ac166ce1.54701969.JPG?1326357617" /></a>  
   <span class="desc" style=""> aaaaaaaaaaaaaaa </span>
   <a href="http://s3.amazonaws.com/Thrill/images/440/large/14c77a671ced5e4.22721576.JPG?1326357627"><img alt="14c77a671ced5e4.22721576" src="http://s3.amazonaws.com/Thrill/images/440/thumb/14c77a671ced5e4.22721576.JPG?1326357627" /></a>   
   <span class="desc" style=""> bbbbbbbbbbbbbbbbbbbbbbbbb </span>
 </div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T19:13:53+00:00Added an answer on June 9, 2026 at 7:13 pm

    It should work: http://jsfiddle.net/7g7am/

    Galleria.run('#galleria', {
        dataConfig: function(img) {
            return {
                description: $(img).parent().next('.desc').html()
            };
        }
    });
    ​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
I am using the Galleria jQuery slideshow plugin. I can get the slideshow to
hello friends i am using this galleria gallery link to display images on my
I'm using Galleria image gallery jQuery plugin. How can i change gallery info button
Using the C# Facebook SDK 5.0.3 everything works fine whit the client.Get(/me). But when
I am using the fancybox.I want to display the image gallery using the galleria
Using Location.getBearing(); I seem to get randomly changing bearings. Aka, I can turn the
How to add the alts to the Galleria Image Gallery since it does not
I am using Galleria plugin for a image gallery on a page this page
i am using jquery galleria which is quite cool but i can't seem to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.