Closed joszz closed 6 years ago
Actually, you managed to effectively break the script with this line:
$.fancybox.defaults.thumbs = {}
Default value for this option is -
thumbs: {
autoStart: false, // Display thumbnails on opening
hideOnClose: true, // Hide thumbnail grid when closing animation starts
parentEl: ".fancybox-container", // Container is injected into this element
axis: "y" // Vertical (y) or horizontal (x) scrolling
}
and as you can see, the script does not expect this to be empty :)
That's me trying to fix the issue. Sorry about that. Removed and still the same though
Could you grab the latest code from GitHub and check if it works now?
Awesome! Works now. Thanks for the support and update. I've said it before and will say it again ; fancybox is the best lightbox out there. Keep up the greatness 😁
Hi,
I upgraded to the latest release (v3.3.1) coming from 3.2.10 on my WordPress blog. After upgrade I was greeted with the error message in the title, logged in the console.
I was already hunting for why this happens now, not sure. It's WordPress and the JQuery Migrate plugin is active, don't know if that is at all relavent. The stack points to the function getThumbPos which is weird because I have no intention showing thumbs :)
A live example of the problem can be found here; https://josnienhuis.gotgeeks.com/gallery/
I know minified JS making things tricky... Sorry for that. I already succesfully upgraded another little side project of mine succesfully so I'm thinking it's something weird with the way it's setup in WordPress. Since it's wordpress (and I don't want to completely customize the hack out of it) I have limited control to some of these things. The gallery is setup with some custom JS which I injected; https://josnienhuis.gotgeeks.com/wp-content/themes/tracks/js/custom.js
This is because I have no way to add data-fancybox="" in the WordPress generated HTML (actually I do but don't feel like mangling up the entire theme, with updates and all, and also my WP knowledge is somewhat limited).
Any advice is welcome :) Or if it's a bug, a fix is also welcome :) Checking for length before assuming there is something is in that jQuery object, could do the trick for me at least.
Thanks in advance.