Gridbox Content Filters Improvements. Filter Items on The Fly!

Continue Reading
Mon. - Fri. 9 am - 5 pm Support Policy
Remember me

Regular HTML image to load a image gallery

3 months 1 week ago #1

  • Joshua's Avatar
  • Joshua
  • Posts: 25
Hi,

I am trying to making a regular HTML image load one of my galleries when clicked.

See what I've done here

When the image at the top is clicked it loads gallery A. And when the image at the bottom is clicked it loads gallery B. I set the URL of the galleries as an "a" tag. This achieves exactly what I want. However, when I click on the image at the bottom of the page, before the gallery loads it reloads the page and brings me back to the top.

Is there any way I can avoid this? Could this be done another way? I'm currently on v 2.1.0 - does a future version support this?

Thanks,
Josh.

3 months 1 week ago #2

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 7120
Hello,

You need to add a custom class for each gallery (not the same class)
And for each link, add code (replace the custom-class to class of your gallery class)
onclick="jQuery('.custom-class .ba-gallery-items').first().trigger('click'); return false;"

Example:


Regards,
Vyacheslav, Balbooa.com

3 months 1 week ago #3

  • Joshua's Avatar
  • Joshua
  • Posts: 25
Hi Vyacheslav,

Thank you for your very quick reply.

I have created two separate galleries with different CSS classes and used your Javascript. The first gallery (top) works perfectly. Thank you so much. However, I can't seem to get the bottom one working. What could I be doing wrong?

Please see website

Thanks,
Josh.

3 months 1 week ago #4

  • Artem's Avatar
  • Artem
  • Posts: 8467
Hello, Josh!

Did you add class suffix "bottom-pop-up" for the second Gallery?



Regards,
Artem, Balbooa.com

3 months 1 week ago #5

  • Joshua's Avatar
  • Joshua
  • Posts: 25
Hi Artem,

Yes I did. Very strange that this doesn't work :(

Regards,
Josh.

3 months 1 week ago #6

  • Artem's Avatar
  • Artem
  • Posts: 8467
Hi :cheer:

As I can see you have added Gallery with an ID - 1, twice. That's mean you didn't add your second Gallery to the page.



Regards,
Artem, Balbooa.com

3 months 1 week ago #7

  • Joshua's Avatar
  • Joshua
  • Posts: 25
Hi Artem,

Silly me. I didn't realise it was still using the shortcode.

I have changed this and it works perfectly. Thank you so much for helping me, you guys offer great support!

Thanks,
Josh.

3 months 1 week ago #8

  • Joshua's Avatar
  • Joshua
  • Posts: 25
I'm currently on v 2.1.0. What is the latest version what additional features does it have? I am looking to update it.

Thanks

3 months 1 week ago #9

  • Artem's Avatar
  • Artem
  • Posts: 8467
The Gallery changelog you can find here:
www.balbooa.com/joomla-gallery-documentation/basics

Regards,
Artem, Balbooa.com

3 months 1 week ago #10

  • Joshua's Avatar
  • Joshua
  • Posts: 25
Thanks :)

3 months 1 week ago #11

  • Artem's Avatar
  • Artem
  • Posts: 8467
You're welcome :)
Let us know if you'll need more assistance!

Regards,
Artem, Balbooa.com
Powered by Kunena Forum