Plugin Directory

Changeset 1301185


Ignore:
Timestamp:
12/05/2015 09:46:33 PM (10 years ago)
Author:
techotronic
Message:

add margin and padding 0 to zoomhover

Location:
jquery-colorbox/trunk/js
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • jquery-colorbox/trunk/js/jquery-colorbox-wrapper-min.js

    r1301184 r1301185  
    1 var COLORBOX_INTERNAL_LINK_PATTERN=/^#.*/;var COLORBOX_SUFFIX_PATTERN=/\.(?:jpe?g|gif|png|bmp)/i;var COLORBOX_MANUAL="colorbox-manual";var COLORBOX_OFF_CLASS=".colorbox-off";var COLORBOX_LINK_CLASS=".colorbox-link";var COLORBOX_OFF="colorbox-off";var COLORBOX_CLASS_PATTERN="colorbox-[0-9]+";var COLORBOX_LINK_CLASS_PATTERN="colorbox-link-[0-9]+";jQuery(document).ready(function(){emulateConsoleForIE();console.group("jQuery Colorbox log messages");if(typeof jQueryColorboxSettingsArray!=="object"){jQueryColorboxSettingsArray=getColorboxConfigDefaults()}if(jQueryColorboxSettingsArray.autoColorboxJavaScript==="true"){colorboxAddManualClass()}if(jQueryColorboxSettingsArray.colorboxAddClassToLinks==="true"){colorboxAddClassToLinks()}if(jQueryColorboxSettingsArray.autoHideFlash==="true"){colorboxHideFlash();colorboxShowFlash()}colorboxSelector();console.groupEnd()});(function(a){emulateConsoleForIE=function(){if(!console){console={}}var b=["log","info","warn","error","debug","trace","dir","group","groupCollapsed","groupEnd","time","timeEnd","profile","profileEnd","dirxml","assert","count","markTimeline","timeStamp","clear"];for(var c=0;c<b.length;c++){if(!console[b[c]]){console[b[c]]=function(){}}}}})(jQuery);(function(a){colorboxShowFlash=function(){a(document).bind("cbox_closed",function(){console.group("Showing flash objects");var e=document.getElementsByTagName("object");for(var d=0;d<e.length;d++){console.debug("Show object %o",e[d]);e[d].style.visibility="visible"}var b=document.getElementsByTagName("embed");for(var c=0;c<b.length;c++){console.debug("Show embed %o",b[c]);b[c].style.visibility="visible"}console.groupEnd()})}})(jQuery);(function(a){colorboxHideFlash=function(){a(document).bind("cbox_open",function(){console.group("Hiding flash objects");var e=document.getElementsByTagName("object");for(var d=0;d<e.length;d++){console.debug("Hide object %o",e[d]);e[d].style.visibility="hidden"}var b=document.getElementsByTagName("embed");for(var c=0;c<b.length;c++){console.debug("Hide embed %o",b[c]);b[c].style.visibility="hidden"}console.groupEnd()})}})(jQuery);(function(a){colorboxAddClassToLinks=function(){console.group("Add colorbox-link class to links pointing to images");a("a:not(:contains(img))").each(function(d,f){var c=a(f);var b=c.attr("class");if(b!==undefined&&!b.match("colorbox")){var e=c.attr("href");if(e!==undefined&&a(f).attr("href").match(COLORBOX_SUFFIX_PATTERN)){console.debug("Add colorbox-link class to %o.",c);c.addClass("colorbox-link")}}});console.groupEnd()}})(jQuery);(function(a){colorboxAddManualClass=function(){console.group("Add colorbox-manual class to images");a("img").each(function(c,e){var d=a(e);var b=d.attr("class");if(b===undefined||!b.match("colorbox")){console.debug("Add colorbox-manual class to image %o",d);d.addClass("colorbox-manual")}});console.groupEnd()}})(jQuery);(function(a){colorboxSelector=function(){console.group("Find image links and apply colorbox effect.");a("a:has(img[class*=colorbox-]):not(.colorbox-off)").each(function(b,d){console.group("Found link %o.",d);ColorboxLocal=a.extend(true,{},jQueryColorboxSettingsArray);ColorboxLocal.colorboxMaxWidth=ColorboxLocal.colorboxImageMaxWidth;ColorboxLocal.colorboxMaxHeight=ColorboxLocal.colorboxImageMaxHeight;ColorboxLocal.colorboxHeight=ColorboxLocal.colorboxImageHeight;ColorboxLocal.colorboxWidth=ColorboxLocal.colorboxImageWidth;var c=a(d).attr("href");if(c!==undefined&&c.match(COLORBOX_SUFFIX_PATTERN)){colorboxImage(b,d)}console.groupEnd()});console.groupEnd();console.group("Find links and apply colorbox effect.");a("a[class*=colorbox-link]").each(function(b,d){console.group("Found link %o.",d);ColorboxLocal=a.extend(true,{},jQueryColorboxSettingsArray);var c=a(d).attr("href");if(c!==undefined){colorboxLink(b,d,c)}console.groupEnd()});console.groupEnd()}})(jQuery);(function(a){colorboxImage=function(b,f){var d=a(f).find("img:first");var e=a(f).attr("class");if(e!==undefined){ColorboxLocal.colorboxGroupId=e.match(COLORBOX_CLASS_PATTERN)||e.match(COLORBOX_MANUAL)}if(!ColorboxLocal.colorboxGroupId){var g=d.attr("class");if(g!==undefined&&!g.match(COLORBOX_OFF)){ColorboxLocal.colorboxGroupId=g.match(COLORBOX_CLASS_PATTERN)||g.match(COLORBOX_MANUAL)}if(ColorboxLocal.colorboxGroupId){ColorboxLocal.colorboxGroupId=ColorboxLocal.colorboxGroupId.toString().split("-")[1];if(ColorboxLocal.colorboxGroupId==="manual"){ColorboxLocal.colorboxGroupId="nofollow"}var c=d.attr("title");if(c!==undefined){ColorboxLocal.colorboxTitle=c}if(jQueryColorboxSettingsArray.addZoomOverlay==="true"){colorboxAddZoomOverlayToImages(a(f),d)}console.debug("Call colorbox for image %o.",d);colorboxWrapper(f)}}}})(jQuery);(function(a){colorboxLink=function(c,e,f){ColorboxLocal.colorboxGroupId=a(e).attr("class").match(COLORBOX_LINK_CLASS_PATTERN);if(ColorboxLocal.colorboxGroupId!==undefined&&ColorboxLocal.colorboxGroupId!==null){ColorboxLocal.colorboxGroupId=ColorboxLocal.colorboxGroupId.toString().split("-")[2]}else{ColorboxLocal.colorboxGroupId="nofollow"}var b=a(e);var d=b.attr("title");if(d!==undefined){ColorboxLocal.colorboxTitle=d}else{ColorboxLocal.colorboxTitle=""}if(f.match(COLORBOX_SUFFIX_PATTERN)){ColorboxLocal.colorboxMaxWidth=ColorboxLocal.colorboxImageMaxWidth;ColorboxLocal.colorboxMaxHeight=ColorboxLocal.colorboxImageMaxHeight;ColorboxLocal.colorboxHeight=ColorboxLocal.colorboxImageHeight;ColorboxLocal.colorboxWidth=ColorboxLocal.colorboxImageWidth}else{ColorboxLocal.colorboxMaxWidth=false;ColorboxLocal.colorboxMaxHeight=false;ColorboxLocal.colorboxHeight=ColorboxLocal.colorboxLinkHeight;ColorboxLocal.colorboxWidth=ColorboxLocal.colorboxLinkWidth;if(f.match(COLORBOX_INTERNAL_LINK_PATTERN)){ColorboxLocal.colorboxInline=true}else{ColorboxLocal.colorboxIframe=true}}console.debug("Call colorbox for link %o.",e);colorboxWrapper(e)}})(jQuery);(function(a){colorboxWrapper=function(b){a.each(ColorboxLocal,function(c,d){if(d==="false"){ColorboxLocal[c]=false}else{if(d==="true"){ColorboxLocal[c]=true}}});console.debug("Apply colorbox to link %o with values %o",b,ColorboxLocal);a(b).colorbox({transition:ColorboxLocal.colorboxTransition,speed:parseInt(ColorboxLocal.colorboxSpeed),title:ColorboxLocal.colorboxTitle,rel:ColorboxLocal.colorboxGroupId,scalePhotos:ColorboxLocal.colorboxScalePhotos,scrolling:ColorboxLocal.colorboxScrolling,opacity:ColorboxLocal.colorboxOpacity,preloading:ColorboxLocal.colorboxPreloading,overlayClose:ColorboxLocal.colorboxOverlayClose,escKey:ColorboxLocal.colorboxEscKey,arrowKey:ColorboxLocal.colorboxArrowKey,loop:ColorboxLocal.colorboxLoop,current:ColorboxLocal.colorboxCurrent,previous:ColorboxLocal.colorboxPrevious,next:ColorboxLocal.colorboxNext,close:ColorboxLocal.colorboxClose,xhrError:ColorboxLocal.colorboxXhrError,imgError:ColorboxLocal.colorboxImgError,iframe:ColorboxLocal.colorboxIframe,inline:ColorboxLocal.colorboxInline,width:ColorboxLocal.colorboxWidth,height:ColorboxLocal.colorboxHeight,initialWidth:ColorboxLocal.colorboxInitialWidth,initialHeight:ColorboxLocal.colorboxInitialHeight,maxWidth:ColorboxLocal.colorboxMaxWidth,maxHeight:ColorboxLocal.colorboxMaxHeight,slideshow:ColorboxLocal.colorboxSlideshow,slideshowSpeed:parseInt(ColorboxLocal.colorboxSlideshowSpeed),slideshowAuto:ColorboxLocal.colorboxSlideshowAuto,slideshowStart:ColorboxLocal.colorboxSlideshowStart,slideshowStop:ColorboxLocal.colorboxSlideshowStop})}})(jQuery);(function(a){colorboxAddZoomOverlayToImages=function(c,d){console.debug("Add zoom hover to link %o",c);var b=a('<span class="zoomHover" style="opacity: 0;"></span>');c.css("float",d.css("float"));c.append(b);c.addClass("zoomLink");c.hover(function(){b.stop().animate({opacity:0.8},300);d.stop().animate({opacity:0.6},300)},function(){b.stop().animate({opacity:0},300);d.stop().animate({opacity:1},300)})}})(jQuery);(function(a){getColorboxConfigDefaults=function(){return{colorboxInline:false,colorboxIframe:false,colorboxGroupId:"",colorboxTitle:"",colorboxWidth:false,colorboxHeight:false,colorboxMaxWidth:false,colorboxMaxHeight:false,colorboxSlideshow:false,colorboxSlideshowAuto:false,colorboxScalePhotos:false,colorboxPreloading:false,colorboxOverlayClose:false,colorboxLoop:false,colorboxEscKey:true,colorboxArrowKey:true,colorboxScrolling:false,colorboxOpacity:"0.85",colorboxTransition:"elastic",colorboxSpeed:"350",colorboxSlideshowSpeed:"2500",colorboxClose:"close",colorboxNext:"next",colorboxPrevious:"previous",colorboxSlideshowStart:"start slideshow",colorboxSlideshowStop:"stop slideshow",colorboxCurrent:"{current} of {total} images",colorboxXhrError:"This content failed to load.",colorboxImgError:"This image failed to load.",colorboxImageMaxWidth:false,colorboxImageMaxHeight:false,colorboxImageHeight:false,colorboxImageWidth:false,colorboxLinkHeight:false,colorboxLinkWidth:false,colorboxInitialHeight:100,colorboxInitialWidth:300,autoColorboxJavaScript:false,autoHideFlash:false,autoColorbox:false,autoColorboxGalleries:false,colorboxAddClassToLinks:false,useGoogleJQuery:false,addZoomOverlay:false}}})(jQuery);
     1var COLORBOX_INTERNAL_LINK_PATTERN=/^#.*/;var COLORBOX_SUFFIX_PATTERN=/\.(?:jpe?g|gif|png|bmp)/i;var COLORBOX_MANUAL="colorbox-manual";var COLORBOX_OFF_CLASS=".colorbox-off";var COLORBOX_LINK_CLASS=".colorbox-link";var COLORBOX_OFF="colorbox-off";var COLORBOX_CLASS_PATTERN="colorbox-[0-9]+";var COLORBOX_LINK_CLASS_PATTERN="colorbox-link-[0-9]+";jQuery(document).ready(function(){emulateConsoleForIE();console.group("jQuery Colorbox log messages");if(typeof jQueryColorboxSettingsArray!=="object"){jQueryColorboxSettingsArray=getColorboxConfigDefaults()}if(jQueryColorboxSettingsArray.autoColorboxJavaScript==="true"){colorboxAddManualClass()}if(jQueryColorboxSettingsArray.colorboxAddClassToLinks==="true"){colorboxAddClassToLinks()}if(jQueryColorboxSettingsArray.autoHideFlash==="true"){colorboxHideFlash();colorboxShowFlash()}colorboxSelector();console.groupEnd()});(function(a){emulateConsoleForIE=function(){if(!console){console={}}var b=["log","info","warn","error","debug","trace","dir","group","groupCollapsed","groupEnd","time","timeEnd","profile","profileEnd","dirxml","assert","count","markTimeline","timeStamp","clear"];for(var c=0;c<b.length;c++){if(!console[b[c]]){console[b[c]]=function(){}}}}})(jQuery);(function(a){colorboxShowFlash=function(){a(document).bind("cbox_closed",function(){console.group("Showing flash objects");var e=document.getElementsByTagName("object");for(var d=0;d<e.length;d++){console.debug("Show object %o",e[d]);e[d].style.visibility="visible"}var b=document.getElementsByTagName("embed");for(var c=0;c<b.length;c++){console.debug("Show embed %o",b[c]);b[c].style.visibility="visible"}console.groupEnd()})}})(jQuery);(function(a){colorboxHideFlash=function(){a(document).bind("cbox_open",function(){console.group("Hiding flash objects");var e=document.getElementsByTagName("object");for(var d=0;d<e.length;d++){console.debug("Hide object %o",e[d]);e[d].style.visibility="hidden"}var b=document.getElementsByTagName("embed");for(var c=0;c<b.length;c++){console.debug("Hide embed %o",b[c]);b[c].style.visibility="hidden"}console.groupEnd()})}})(jQuery);(function(a){colorboxAddClassToLinks=function(){console.group("Add colorbox-link class to links pointing to images");a("a:not(:contains(img))").each(function(d,f){var c=a(f);var b=c.attr("class");if(b!==undefined&&!b.match("colorbox")){var e=c.attr("href");if(e!==undefined&&a(f).attr("href").match(COLORBOX_SUFFIX_PATTERN)){console.debug("Add colorbox-link class to %o.",c);c.addClass("colorbox-link")}}});console.groupEnd()}})(jQuery);(function(a){colorboxAddManualClass=function(){console.group("Add colorbox-manual class to images");a("img").each(function(c,e){var d=a(e);var b=d.attr("class");if(b===undefined||!b.match("colorbox")){console.debug("Add colorbox-manual class to image %o",d);d.addClass("colorbox-manual")}});console.groupEnd()}})(jQuery);(function(a){colorboxSelector=function(){console.group("Find image links and apply colorbox effect.");a("a:has(img[class*=colorbox-]):not(.colorbox-off)").each(function(b,d){console.group("Found link %o.",d);ColorboxLocal=a.extend(true,{},jQueryColorboxSettingsArray);ColorboxLocal.colorboxMaxWidth=ColorboxLocal.colorboxImageMaxWidth;ColorboxLocal.colorboxMaxHeight=ColorboxLocal.colorboxImageMaxHeight;ColorboxLocal.colorboxHeight=ColorboxLocal.colorboxImageHeight;ColorboxLocal.colorboxWidth=ColorboxLocal.colorboxImageWidth;var c=a(d).attr("href");if(c!==undefined&&c.match(COLORBOX_SUFFIX_PATTERN)){colorboxImage(b,d)}console.groupEnd()});console.groupEnd();console.group("Find links and apply colorbox effect.");a("a[class*=colorbox-link]").each(function(b,d){console.group("Found link %o.",d);ColorboxLocal=a.extend(true,{},jQueryColorboxSettingsArray);var c=a(d).attr("href");if(c!==undefined){colorboxLink(b,d,c)}console.groupEnd()});console.groupEnd()}})(jQuery);(function(a){colorboxImage=function(b,f){var d=a(f).find("img:first");var e=a(f).attr("class");if(e!==undefined){ColorboxLocal.colorboxGroupId=e.match(COLORBOX_CLASS_PATTERN)||e.match(COLORBOX_MANUAL)}if(!ColorboxLocal.colorboxGroupId){var g=d.attr("class");if(g!==undefined&&!g.match(COLORBOX_OFF)){ColorboxLocal.colorboxGroupId=g.match(COLORBOX_CLASS_PATTERN)||g.match(COLORBOX_MANUAL)}if(ColorboxLocal.colorboxGroupId){ColorboxLocal.colorboxGroupId=ColorboxLocal.colorboxGroupId.toString().split("-")[1];if(ColorboxLocal.colorboxGroupId==="manual"){ColorboxLocal.colorboxGroupId="nofollow"}var c=d.attr("title");if(c!==undefined){ColorboxLocal.colorboxTitle=c}if(jQueryColorboxSettingsArray.addZoomOverlay==="true"){colorboxAddZoomOverlayToImages(a(f),d)}console.debug("Call colorbox for image %o.",d);colorboxWrapper(f)}}}})(jQuery);(function(a){colorboxLink=function(c,e,f){ColorboxLocal.colorboxGroupId=a(e).attr("class").match(COLORBOX_LINK_CLASS_PATTERN);if(ColorboxLocal.colorboxGroupId!==undefined&&ColorboxLocal.colorboxGroupId!==null){ColorboxLocal.colorboxGroupId=ColorboxLocal.colorboxGroupId.toString().split("-")[2]}else{ColorboxLocal.colorboxGroupId="nofollow"}var b=a(e);var d=b.attr("title");if(d!==undefined){ColorboxLocal.colorboxTitle=d}else{ColorboxLocal.colorboxTitle=""}if(f.match(COLORBOX_SUFFIX_PATTERN)){ColorboxLocal.colorboxMaxWidth=ColorboxLocal.colorboxImageMaxWidth;ColorboxLocal.colorboxMaxHeight=ColorboxLocal.colorboxImageMaxHeight;ColorboxLocal.colorboxHeight=ColorboxLocal.colorboxImageHeight;ColorboxLocal.colorboxWidth=ColorboxLocal.colorboxImageWidth}else{ColorboxLocal.colorboxMaxWidth=false;ColorboxLocal.colorboxMaxHeight=false;ColorboxLocal.colorboxHeight=ColorboxLocal.colorboxLinkHeight;ColorboxLocal.colorboxWidth=ColorboxLocal.colorboxLinkWidth;if(f.match(COLORBOX_INTERNAL_LINK_PATTERN)){ColorboxLocal.colorboxInline=true}else{ColorboxLocal.colorboxIframe=true}}console.debug("Call colorbox for link %o.",e);colorboxWrapper(e)}})(jQuery);(function(a){colorboxWrapper=function(b){a.each(ColorboxLocal,function(c,d){if(d==="false"){ColorboxLocal[c]=false}else{if(d==="true"){ColorboxLocal[c]=true}}});console.debug("Apply colorbox to link %o with values %o",b,ColorboxLocal);a(b).colorbox({transition:ColorboxLocal.colorboxTransition,speed:parseInt(ColorboxLocal.colorboxSpeed),title:ColorboxLocal.colorboxTitle,rel:ColorboxLocal.colorboxGroupId,scalePhotos:ColorboxLocal.colorboxScalePhotos,scrolling:ColorboxLocal.colorboxScrolling,opacity:ColorboxLocal.colorboxOpacity,preloading:ColorboxLocal.colorboxPreloading,overlayClose:ColorboxLocal.colorboxOverlayClose,escKey:ColorboxLocal.colorboxEscKey,arrowKey:ColorboxLocal.colorboxArrowKey,loop:ColorboxLocal.colorboxLoop,current:ColorboxLocal.colorboxCurrent,previous:ColorboxLocal.colorboxPrevious,next:ColorboxLocal.colorboxNext,close:ColorboxLocal.colorboxClose,xhrError:ColorboxLocal.colorboxXhrError,imgError:ColorboxLocal.colorboxImgError,iframe:ColorboxLocal.colorboxIframe,inline:ColorboxLocal.colorboxInline,width:ColorboxLocal.colorboxWidth,height:ColorboxLocal.colorboxHeight,initialWidth:ColorboxLocal.colorboxInitialWidth,initialHeight:ColorboxLocal.colorboxInitialHeight,maxWidth:ColorboxLocal.colorboxMaxWidth,maxHeight:ColorboxLocal.colorboxMaxHeight,slideshow:ColorboxLocal.colorboxSlideshow,slideshowSpeed:parseInt(ColorboxLocal.colorboxSlideshowSpeed),slideshowAuto:ColorboxLocal.colorboxSlideshowAuto,slideshowStart:ColorboxLocal.colorboxSlideshowStart,slideshowStop:ColorboxLocal.colorboxSlideshowStop})}})(jQuery);(function(a){colorboxAddZoomOverlayToImages=function(c,d){console.debug("Add zoom hover to link %o",c);var b=a('<span class="zoomHover" style="opacity: 0; margin: 0; padding: 0;"></span>');c.css("float",d.css("float"));c.append(b);c.addClass("zoomLink");c.hover(function(){b.stop().animate({opacity:0.8},300);d.stop().animate({opacity:0.6},300)},function(){b.stop().animate({opacity:0},300);d.stop().animate({opacity:1},300)})}})(jQuery);(function(a){getColorboxConfigDefaults=function(){return{colorboxInline:false,colorboxIframe:false,colorboxGroupId:"",colorboxTitle:"",colorboxWidth:false,colorboxHeight:false,colorboxMaxWidth:false,colorboxMaxHeight:false,colorboxSlideshow:false,colorboxSlideshowAuto:false,colorboxScalePhotos:false,colorboxPreloading:false,colorboxOverlayClose:false,colorboxLoop:false,colorboxEscKey:true,colorboxArrowKey:true,colorboxScrolling:false,colorboxOpacity:"0.85",colorboxTransition:"elastic",colorboxSpeed:"350",colorboxSlideshowSpeed:"2500",colorboxClose:"close",colorboxNext:"next",colorboxPrevious:"previous",colorboxSlideshowStart:"start slideshow",colorboxSlideshowStop:"stop slideshow",colorboxCurrent:"{current} of {total} images",colorboxXhrError:"This content failed to load.",colorboxImgError:"This image failed to load.",colorboxImageMaxWidth:false,colorboxImageMaxHeight:false,colorboxImageHeight:false,colorboxImageWidth:false,colorboxLinkHeight:false,colorboxLinkWidth:false,colorboxInitialHeight:100,colorboxInitialWidth:300,autoColorboxJavaScript:false,autoHideFlash:false,autoColorbox:false,autoColorboxGalleries:false,colorboxAddClassToLinks:false,useGoogleJQuery:false,addZoomOverlay:false}}})(jQuery);
  • jquery-colorbox/trunk/js/jquery-colorbox-wrapper.js

    r1301184 r1301185  
    429429  colorboxAddZoomOverlayToImages = function ($link, $image) {
    430430    console.debug("Add zoom hover to link %o",$link);
    431     var $zoomHover = jQuery('<span class="zoomHover" style="opacity: 0;"></span>');
     431    var $zoomHover = jQuery('<span class="zoomHover" style="opacity: 0; margin: 0; padding: 0;"></span>');
    432432
    433433    //add float from image to link, otherwise the zoom overlay would not be visible
Note: See TracChangeset for help on using the changeset viewer.