blivesta / animsition

A simple and easy jQuery plugin for CSS animated page transitions.
http://git.blivesta.com/animsition
MIT License
3.83k stars 781 forks source link

Fancybox issue with animsition #153

Closed elmarwouters closed 5 years ago

elmarwouters commented 5 years ago

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?

mbzr commented 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.

elmarwouters commented 5 years ago

@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)',

mbzr commented 5 years ago

Wow i am using fancybox 3 and it works for me. Do you have a demo so i can take a look?

elmarwouters commented 5 years ago

@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

mbzr commented 5 years ago

I believe this is a jquery error, you should have a look at this https://github.com/jquery/jquery/issues/2885

elmarwouters commented 5 years ago

Okay, that's clear. I've changed it. No errors. Still same bug

elmarwouters commented 5 years ago

Fixed, fancybox is going over the body. And animsition is now on another section.

Problem solved