Changeset 5734 for extensions/lightbox/jquery.colorbox.js
- Timestamp:
- Apr 9, 2010, 2:47:28 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/lightbox/jquery.colorbox.js
r4621 r5734 1 // ColorBox v1.3. 5- a full featured, light-weight, customizable lightbox based on jQuery 1.31 // ColorBox v1.3.6 - a full featured, light-weight, customizable lightbox based on jQuery 1.3 2 2 // c) 2009 Jack Moore - www.colorpowered.com - jack@colorpowered.com 3 3 // Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php … … 10 10 FALSE = false, 11 11 cboxPublic, 12 isIE = !$.support.opacity,13 isIE6 = isIE && !window.XMLHttpRequest,12 isIE = $.browser.msie && !$.support.opacity, // feature detection alone gave false positives in some browsers 13 isIE6 = isIE && $.browser.version < 7, 14 14 15 15 // Event Strings (to increase compression) … … 123 123 } 124 124 } 125 settings.rel = settings.rel || element.rel; 126 settings.href = settings.href || element.href; 127 settings.title = settings.title || element.title; 125 128 } 126 129 … … 133 136 process(); // Convert functions to their returned values. 134 137 135 var rel = settings.rel || element.rel; 136 137 if (rel && rel !== 'nofollow') { 138 if (settings.rel && settings.rel !== 'nofollow') { 138 139 $related = $('.cboxElement').filter(function () { 139 140 var relRelated = $(this).data(colorbox).rel || this.rel; 140 return (relRelated === rel);141 return (relRelated === settings.rel); 141 142 }); 142 143 index = $related.index(element); … … 162 163 163 164 // Set Navigation Key Bindings 164 $( ).bind("keydown.cbox_close", function (e) {165 $(document).bind("keydown.cbox_close", function (e) { 165 166 if (e.keyCode === 27) { 166 167 e.preventDefault(); … … 222 223 if (!$this.length) { 223 224 if ($this.selector === '') { // empty selector means a direct call, ie: $.fn.colorbox(); 224 $this = $( $this);225 $this = $('<a/>'); 225 226 options.open = TRUE; 226 227 } else { // else the selector didn't match anything, and colorbox should go ahead and return. … … 303 304 // Add rollover event to navigation elements 304 305 $content.children() 305 . addClass(hover)306 .mouseover(function () { $(this).addClass(hover); })307 .mouseout(function () { $(this).removeClass(hover); });306 .bind('mouseover mouseout', function(){ 307 $(this).toggleClass(hover); 308 }).addClass(hover); 308 309 309 310 // Cache values needed for size calculations … … 445 446 //This increases compatability with pages using DOM dependent JavaScript. 446 447 if(settings.iframe){ 447 $loaded.append("<iframe id='cboxIframe'" + (settings.scrolling ? " " : "scrolling='no'") + " name='iframe_"+new Date().getTime()+"' frameborder=0 src='"+ (settings.href || element.href)+"' " + (isIE ? "allowtransparency='true'" : '') + " />");448 $loaded.append("<iframe id='cboxIframe'" + (settings.scrolling ? " " : "scrolling='no'") + " name='iframe_"+new Date().getTime()+"' frameborder=0 src='"+settings.href+"' " + (isIE ? "allowtransparency='true'" : '') + " />"); 448 449 } 449 450 450 451 $loaded.show(); 451 452 452 $title.html(settings.title || element.title); 453 454 $title.show(); 453 $title.show().html(settings.title); 455 454 456 455 if ($related.length>1) { … … 578 577 } 579 578 580 href = settings.href || $(element).attr("href");579 href = settings.href; 581 580 582 581 $loadingOverlay.show(); … … 718 717 719 718 open = FALSE; 720 $( ).unbind("keydown.cbox_close keydown.cbox_arrows");719 $(document).unbind("keydown.cbox_close keydown.cbox_arrows"); 721 720 $window.unbind(cbox_resize+' resize.cboxie6 scroll.cboxie6'); 722 721 $overlay.css({cursor: 'auto'}).fadeOut('fast'); … … 725 724 .stop(TRUE, FALSE) 726 725 .fadeOut('fast', function () { 726 $('#colorbox iframe').attr('src', 'about:blank'); 727 727 $loaded.remove(); 728 728 $cbox.css({'opacity': 1});
Note: See TracChangeset
for help on using the changeset viewer.