Could we help you? Please click the banners. We are young and desperately need the money
After updating WordPress, which brings in it's own JQuery, i expirienced a bug. The WordPress had JQuery with JQuery Fancybox installed.
The bug says:
Uncaught TypeError: j.get(...).style.removeAttribute is not a function
at HTMLDivElement.S (jquery.fancybox-1.3.4.pack.js:31)
at HTMLDivElement.d.complete (jquery-min.js:3)
at i (jquery-min.js:2)
at Object.fireWith [as resolveWith] (jquery-min.js:2)
at i (jquery-min.js:3)
at n.fx.tick (jquery-min.js:3)
This bug happens because newer JQuery versions don't use style.removeAttribute anymore. So the style for closing the Fancybox-Popup cannot be attached anymore.
It is possible to alter the jquery.fancybox.js file in order to get the Fancybox closing event working again. For that you have to go into the jquery.fancybox.js file and change the following lines as seen below:
_finish = function () {
if (!$.support.opacity) {
- content.get(0).style.removeAttribute('filter');
- wrap.get(0).style.removeAttribute('filter');
+ $('#fancybox-content').css('filter', 0);
+ $('#fancybox-wrap').css('filter', 0);
}
After you changed this file, just save it and you Fancybox should now be closing again.
You can also check this issue here: https://github.com/nvidoni/fancybox/issues/2