Closed elmarwouters closed 5 years ago
You are not supposed to have strings in the :not()
operator, so you should be excluding the class like this :not(.fancyBoxLink)
without the string. Probably after you fix this, you wont need to exclude the close button anymore.
@MahmoodBawazir didn't help
linkElement: 'a:not([target="_blank"]):not([href^="#"]):not(#scroll-to-home-more):not(.no-animsition):not(.fancyBoxLink),button:not(.fancybox-button)',
Wow i am using fancybox 3 and it works for me. Do you have a demo so i can take a look?
@MahmoodBawazir I can't share a demo, project is local.
And it's for a client, who doesn't like to be shared on this kind of forums. I hope you can understand.
What I can provide is this, it's desplayed in the console box
main-default-bottom-cached.js:2 Uncaught Error: Syntax error, unrecognized expression: a:not([target="_blank"]):not([href^="#"]):not(#scroll-to-home-more):not(.no-animsition):not(.fancyBoxLink)|button
I believe this is a jquery error, you should have a look at this https://github.com/jquery/jquery/issues/2885
Okay, that's clear. I've changed it. No errors. Still same bug
Fixed, fancybox is going over the body. And animsition is now on another section.
Problem solved
When opening an fancybox the animsition is not called, when i close the fancybox with the button (
<button data-fancybox-close="" class="fancybox-button fancybox-button--close" title="Close (Esc)"></button>
) the overlay of animsition is activated again and won't close.I already tried excluding it on the linkElement with this:
linkElement: 'a:not([target="_blank"]):not([href^="#"]):not(#scroll-to-home-more):not(".no-animsition"):not(".fancyBoxLink"),button:not(".fancybox-button")',
Without luck you can guess. Is there an simple workaround?