Answer the question
In order to leave comments, you need to log in
Setting up fancybox on Bitrix?
Why doesn't fancybox for pictures work on Bitrix, I'm not ok in Bitrix, so where to start picking?
PS The code is not mine, but I need to redo it.
The only code I found:
function(n, i, _, d) {
var s = _("html"),
o = _(n),
c = _(i),
$ = _.fancybox = function() {
$.open.apply(this, arguments)
},
r = navigator.userAgent.match(/msie/i),
a = null,
l = i.createTouch !== d,
p = function(e) {
return e && e.hasOwnProperty && e instanceof _
},
u = function(e) {
return e && "string" === _.type(e)
},
E = function(e) {
return u(e) && 0 < e.indexOf("%")
},
P = function(e, t) {
var i = parseInt(e, 10) || 0;
return t && E(e) && (i *= $.getViewport()[t] / 100), Math.ceil(i)
},
A = function(e, t) {
return P(e, t) + "px"
};
_.extend($, {
version: "2.1.7",
defaults: {
padding: 15,
margin: 20,
width: 800,
height: 600,
minWidth: 100,
minHeight: 100,
maxWidth: 9999,
maxHeight: 9999,
pixelRatio: 1,
autoSize: !0,
autoHeight: !1,
autoWidth: !1,
autoResize: !0,
autoCenter: !l,
fitToView: !0,
aspectRatio: !1,
topRatio: .5,
leftRatio: .5,
arrows: true,
scrolling: "auto",
wrapCSS: "",
arrows: true,
closeBtn: !0,
closeClick: !1,
nextClick: !1,
mouseWheel: !0,
autoPlay: !1,
playSpeed: 3e3,
preload: 3,
modal: !1,
loop: !0,
ajax: {
dataType: "html",
headers: {
"X-fancyBox": !0
}
},
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question