Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No arrowKey on jQuery Colorbox Wordpres Plugin #879

Open
danjde opened this issue Jun 21, 2019 · 1 comment
Open

No arrowKey on jQuery Colorbox Wordpres Plugin #879

danjde opened this issue Jun 21, 2019 · 1 comment

Comments

@danjde
Copy link

danjde commented Jun 21, 2019

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

@jackmoore
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants