Hash not working on selector #2444
Comments
Here's the relevant line: Line 53 in c4fd903
|
Hi, Hash plugin grabs URL.hash and looks if any element has FYI, I am right now working on hash plugin for v4 (you can preview it here https://fancyapps.com/next/) so it might work in the future like you expect, but for v3 you have to use |
btw, nothing prevents you from starting fancybox manually, e.g., you could either trigger click event on corresponding link or use |
Good to know when I try to implement this for WP (if I knew how!). |
I understand. Now, If I would like to hack this (please confirm my finding is correct), how could I get a reference to |
Ah, I wrote that question before I got your other answer. I'll try that. |
Describe the bug
Assuming:
data-fancybox
attribute (my gallery generator is removing those; I know, it's kinda also a bug in it too).fancybox
is launched with aselector
because the images are generated (I think; this is whatselector
is for, and it's not working without it; I already tried$('[...]').fancybox(...)
);hash="image"
(BTW, I think the doc is a little bit short here, it took me a while to figure out that for this method of startingfancybox
I should set it to a string).Then
triggerFromUrl()
fails because it's using$("[data-fancybox='" + $.escapeSelector(url.gallery) + "']")
instead ofselector
.To Reproduce
Steps to reproduce the behavior:
Expected behavior
The lightbox opens in the image.
Desktop:
The text was updated successfully, but these errors were encountered: