colorbox icon indicating copy to clipboard operation
colorbox copied to clipboard

No arrowKey on jQuery Colorbox Wordpres Plugin

Open danjde opened this issue 5 years ago • 1 comments

Hi Devs! I'm using jQuery Colorbox Wordpres Plugin. Using some photos on the same into another container plugin, I'm not able to show the arrowkey. I've check jquery.colorbox.js and it's seem ok:

arrowKey: true,

What I should do for enable arrow key or verify some issues on this situation? PS if you like I can show page URL

Many thanks

Davide

danjde avatar Jun 21 '19 11:06 danjde

Hey Davide, this is the repository for Colorbox, but not for the Wordpress plugin which uses Colorbox as a foundation. I can't speak for any Wordpress plugin specific issues, but if the previous/next arrows aren't showing up on your images, then that's probably because they haven't been grouped together.

The arrowKey setting is only for allowing / disallowing the use of keyboard arrow keys to cycle within elements of the group, but has nothing to do with grouping itself. It sounds like you need to indicate to Colorbox which items you want grouped together.

When you assign Colorbox to an element, you can either group the links together using the rel attribute, or data-rel attribute, or by passing Colorbox a rel value for a certain group of in-page elements.

Here is an example of using the data-rel attribute:

<a href='1.jpg' class='gallery' data-rel='vacation'>Pic 1</a>
<a href='2.jpg' class='gallery' data-rel='vacation'>Pic 2</a>
<script>$('.gallery').colorbox();</script>

Here is an example of using Colorbox's rel setting:

<a href='1.jpg' class='gallery'>Pic 1</a>
<a href='2.jpg' class='gallery'>Pic 2</a>
<script>$('.gallery').colorbox({rel: 'vacation'});</script>

Good luck, I hope that helps.

jackmoore avatar Jun 21 '19 21:06 jackmoore