1// JavaScript Document fancybox Effects 2 3 $(document).ready(function() { 4 // Simple image gallery. Uses default settings 5 $('.fancybox').fancybox(); 6 // Change title type, overlay closing speed 7 $(".fancybox-effects-a").fancybox({ 8 helpers: { 9 title : { 10 type : 'outside' 11 }, 12 overlay : { 13 speedOut : 0 14 } 15 } 16 }); 17 18 // Disable opening and closing animations, change title type 19 $(".fancybox-effects-b").fancybox({ 20 openEffect : 'none', 21 closeEffect : 'none', 22 23 helpers : { 24 title : { 25 type : 'over' 26 } 27 } 28 }); 29 30 // Set custom style, close if clicked, change title type and overlay color 31 $(".fancybox-effects-c").fancybox({ 32 wrapCSS : 'fancybox-custom', 33 closeClick : true, 34 openEffect : 'none', 35 helpers : { 36 title : { 37 type : 'inside' 38 }, 39 overlay : { 40 css : { 41 'background' : 'rgba(238,238,238,0.85)' 42 } 43 } 44 } 45 }); 46 47 // Remove padding, set opening and closing animations, close if clicked and disable overlay 48 $(".fancybox-effects-d").fancybox({ 49 padding: 0, 50 openEffect : 'elastic', 51 openSpeed : 150, 52 closeEffect : 'elastic', 53 closeSpeed : 150, 54 closeClick : true, 55 helpers : { 56 overlay : null 57 } 58 }); 59 60 // Button helper. Disable animations, hide close button, change title type and content 61 $('.fancybox-buttons').fancybox({ 62 openEffect : 'none', 63 closeEffect : 'none', 64 65 prevEffect : 'none', 66 nextEffect : 'none', 67 68 closeBtn : false, 69 70 helpers : { 71 title : { 72 type : 'inside' 73 }, 74 buttons : {} 75 }, 76 77 afterLoad : function() { 78 this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : ''); 79 } 80 }); 81 82 // Thumbnail helper. Disable animations, hide close button, arrows and slide to next gallery item if clicked 83 $('.fancybox-thumbs').fancybox({ 84 prevEffect : 'elastic', 85 nextEffect : 'elastic', 86 87 closeBtn : false, 88 arrows : true, 89 nextClick : true, 90 91 helpers : { 92 thumbs : { 93 width : 80, 94 height : 50 95 } 96 } 97 }); 98 99 // Media helper. Group items, disable animations, hide arrows, enable media and button helpers. 100 $('.fancybox-media') 101 .attr('rel', 'media-gallery') 102 .fancybox({ 103 openEffect : 'none', 104 closeEffect : 'none', 105 prevEffect : 'none', 106 nextEffect : 'none', 107 108 arrows : false, 109 helpers : { 110 media : {}, 111 buttons : {} 112 } 113 }); 114 115 // Open manually 116 $("#fancybox-manual-a").click(function() { 117 $.fancybox.open('1_b.jpg'); 118 }); 119 120 $("#fancybox-manual-b").click(function() { 121 $.fancybox.open({ 122 href : 'iframe.html', 123 type : 'iframe', 124 padding : 5 125 }); 126 }); 127 128 $("#fancybox-manual-c").click(function() { 129 $.fancybox.open([ 130 { 131 href : '1_b.jpg', 132 title : 'My title' 133 }, { 134 href : '2_b.jpg', 135 title : '2nd title' 136 }, { 137 href : '3_b.jpg' 138 } 139 ], { 140 helpers : { 141 thumbs : { 142 width: 75, 143 height: 50 144 } 145 } 146 }); 147 }); 148 149 150 });
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.