‘}, gallery: { enabled: true, arrowMarkup: ‘‘, tCounter: ‘%curr% of %total%‘, preload: [0,1] }, closeMarkup : ‘‘, callbacks: { buildControls: function() { if(winWidth>1024) this.content.find(‘div.container-image’).append(this.arrowLeft.add(this.arrowRight)); }, markupParse: function(template, values, item){ item.img = $ (‘‘); item.img.attr(‘src’, values.urlImage_img); }, open: function(){ this.contentContainer.css({‘display’:’none’}); if(winWidth>=1024 && navigator.userAgent.ind exOf(‘iPad’)‘); },600); DaxCallback({ ‘type’:’photo’, ‘source_modal’: formatSt(title), ‘modal’: formatSt(this.currItem.data.title), ‘refresh’: ‘no’ }); if($ (this.content).find(‘div.container-image’).parent().hasClass(“horizontal”)){ $ (this.content).find(‘div.container-image’).parent().removeClass(“horizontal”); }else{ $ (this.content).find(‘div.container-image’).parent().removeClass(“vertical”); } c = this.currItem.data.shares; content = $ (this.content); elmsAShare = content.find(‘.mfp-share’); elmsAShare.each(function(){ elm = $ (this); className = elm.attr(‘class’); switch(className){ case ‘mfpshare-facebook’: elm.attr(‘data-url’, shares.facebook.url); elm.attr(‘data-share’, shares.facebook.share); br eak; case ‘mfpshare-twitter’: elm.attr(‘data-url’, shares.twitter.url); elm.attr(‘data-share’, shares.twitter.share); elm.attr(‘data-user-twitter’, shares.twitter.userTwitter); break; case ‘mfpshare-whatsapp’: elm.attr(‘href’, shares.whatsapp.url); break; } elm.attr(‘onclick’, “sharePopUp(this.dataset);return false;”); }); $ (this.content).find(‘div.container-image’).parent().addClass(this.currItem.data.class); $ (this.content).find(‘img’).attr(‘alt’, title); $ (this.content).find(‘img’).attr(‘title’, title); $ (this.contentContainer).find(‘img’).one(‘load’, function(){ $ (this).closest(‘.mfp-wrap’).addClass(‘mfp-image-loaded’); $ (this).closest(‘.mfp-content’).css({‘display’:’inline-block’}); $ .magnificPopup.instance.updateS tatus(‘ready’, “); }); }, close: function(){ $ (mfpTrigger).attr(‘data-index’, 0); if(winWidth>1024) { if(navigator.userAgent.indexOf(‘iPad’)’); item.img.attr(‘src’, item.data.urlImage_img); } } }, parseInt($ (mfpTrigger).attr(‘data-index’))); }); }); function formatSt(st){ return st.toLowerCase().replace(/[^a-z0-9]/g, ‘_’); }
No comments:
Post a Comment