vendor: 35,549 bytes, lines 1-1078
1/*! 2 * # Semantic UI 2.2.10 - Transition 3 * http://github.com/semantic-org/semantic-ui/ 4 * 5 * 6 * Released under the MIT license 7 * http://opensource.org/licenses/MIT 8 * 9 */ 10 11;(function ($, window, document, undefined) { 12 13"use strict"; 14 15window = (typeof window != 'undefined' && window.Math == Math) 16 ? window 17 : (typeof self != 'undefined' && self.Math == Math) 18 ? self 19 : Function('return this')() 20; 21 22$.fn.transition = function() { 23 var 24 $allModules = $(this), 25 moduleSelector = $allModules.selector || '', 26 27 time = new Date().getTime(), 28 performance = [], 29 30 moduleArguments = arguments, 31 query = moduleArguments[0], 32 queryArguments = [].slice.call(arguments, 1), 33 methodInvoked = (typeof query === 'string'), 34 35 requestAnimationFrame = window.requestAnimationFrame 36 || window.mozRequestAnimationFrame 37 || window.webkitRequestAnimationFrame 38 || window.msRequestAnimationFrame 39 || function(callback) { setTimeout(callback, 0); }, 40 41 returnedValue 42 ; 43 $allModules 44 .each(function(index) { 45 var 46 $module = $(this), 47 element = this, 48 49 // set at run time 50 settings, 51 instance, 52 53 error, 54 className, 55 metadata, 56 animationEnd, 57 animationName, 58 59 namespace, 60 moduleNamespace, 61 eventNamespace, 62 module 63 ; 64 65 module = { 66 67 initialize: function() { 68 69 // get full settings 70 settings = module.get.settings.apply(element, moduleArguments); 71 72 // shorthand 73 className = settings.className; 74 error = settings.error; 75 metadata = settings.metadata; 76 77 // define namespace 78 eventNamespace = '.' + settings.namespace; 79 moduleNamespace = 'module-' + settings.namespace; 80 instance = $module.data(moduleNamespace) || module; 81 82 // get vendor specific events 83 animationEnd = module.get.animationEndEvent(); 84 85 if(methodInvoked) { 86 methodInvoked = module.invoke(query); 87 } 88 89 // method not invoked, lets run an animation 90 if(methodInvoked === false) { 91 module.verbose('Converted arguments into settings object', settings); 92 if(settings.interval) { 93 module.delay(settings.animate); 94 } 95 else { 96 module.animate(); 97 } 98 module.instantiate(); 99 } 100 }, 101 102 instantiate: function() { 103 module.verbose('Storing instance of module', module); 104 instance = module; 105 $module 106 .data(moduleNamespace, instance) 107 ; 108 }, 109 110 destroy: function() { 111 module.verbose('Destroying previous module for', element); 112 $module 113 .removeData(moduleNamespace) 114 ; 115 }, 116 117 refresh: function() { 118 module.verbose('Refreshing display type on next animation'); 119 delete module.displayType; 120 }, 121 122 forceRepaint: function() { 123 module.verbose('Forcing element repaint'); 124 var 125 $parentElement = $module.parent(), 126 $nextElement = $module.next() 127 ; 128 if($nextElement.length === 0) { 129 $module.detach().appendTo($parentElement); 130 } 131 else { 132 $module.detach().insertBefore($nextElement); 133 } 134 }, 135 136 repaint: function() { 137 module.verbose('Repainting element'); 138 var 139 fakeAssignment = element.offsetWidth 140 ; 141 }, 142 143 delay: function(interval) { 144 var 145 direction = module.get.animationDirection(), 146 shouldReverse, 147 delay 148 ; 149 if(!direction) { 150 direction = module.can.transition() 151 ? module.get.direction() 152 : 'static' 153 ; 154 } 155 interval = (interval !== undefined) 156 ? interval 157 : settings.interval 158 ; 159 shouldReverse = (settings.reverse == 'auto' && direction == className.outward); 160 delay = (shouldReverse || settings.reverse == true) 161 ? ($allModules.length - index) * settings.interval 162 : index * settings.interval 163 ; 164 module.debug('Delaying animation by', delay); 165 setTimeout(module.animate, delay); 166 }, 167 168 animate: function(overrideSettings) { 169 settings = overrideSettings || settings; 170 if(!module.is.supported()) { 171 module.error(error.support); 172 return false; 173 } 174 module.debug('Preparing animation', settings.animation); 175 if(module.is.animating()) { 176 if(settings.queue) { 177 if(!settings.allowRepeats && module.has.direction() && module.is.occurring() && module.queuing !== true) { 178 module.debug('Animation is currently occurring, preventing queueing same animation', settings.animation); 179 } 180 else { 181 module.queue(settings.animation); 182 } 183 return false; 184 } 185 else if(!settings.allowRepeats && module.is.occurring()) { 186 module.debug('Animation is already occurring, will not execute repeated animation', settings.animation); 187 return false; 188 } 189 else { 190 module.debug('New animation started, completing previous early', settings.animation); 191 instance.complete(); 192 } 193 } 194 if( module.can.animate() ) { 195 module.set.animating(settings.animation); 196 } 197 else { 198 module.error(error.noAnimation, settings.animation, element); 199 } 200 }, 201 202 reset: function() { 203 module.debug('Resetting animation to beginning conditions'); 204 module.remove.animationCallbacks(); 205 module.restore.conditions(); 206 module.remove.animating(); 207 }, 208 209 queue: function(animation) { 210 module.debug('Queueing animation of', animation); 211 module.queuing = true; 212 $module 213 .one(animationEnd + '.queue' + eventNamespace, function() { 214 module.queuing = false; 215 module.repaint(); 216 module.animate.apply(this, settings); 217 }) 218 ; 219 }, 220 221 complete: function (event) { 222 module.debug('Animation complete', settings.animation); 223 module.remove.completeCallback(); 224 module.remove.failSafe(); 225 if(!module.is.looping()) { 226 if( module.is.outward() ) { 227 module.verbose('Animation is outward, hiding element'); 228 module.restore.conditions(); 229 module.hide(); 230 } 231 else if( module.is.inward() ) { 232 module.verbose('Animation is outward, showing element'); 233 module.restore.conditions(); 234 module.show(); 235 } 236 else { 237 module.verbose('Static animation completed'); 238 module.restore.conditions(); 239 settings.onComplete.call(element); 240 } 241 } 242 }, 243 244 force: { 245 visible: function() { 246 var 247 style = $module.attr('style'), 248 userStyle = module.get.userStyle(), 249 displayType = module.get.displayType(), 250 overrideStyle = userStyle + 'display: ' + displayType + ' !important;', 251 currentDisplay = $module.css('display'), 252 emptyStyle = (style === undefined || style === '') 253 ; 254 if(currentDisplay !== displayType) { 255 module.verbose('Overriding default display to show element', displayType); 256 $module 257 .attr('style', overrideStyle) 258 ; 259 } 260 else if(emptyStyle) { 261 $module.removeAttr('style'); 262 } 263 }, 264 hidden: function() { 265 var 266 style = $module.attr('style'), 267 currentDisplay = $module.css('display'), 268 emptyStyle = (style === undefined || style === '') 269 ; 270 if(currentDisplay !== 'none' && !module.is.hidden()) { 271 module.verbose('Overriding default display to hide element'); 272 $module 273 .css('display', 'none') 274 ; 275 } 276 else if(emptyStyle) { 277 $module 278 .removeAttr('style') 279 ; 280 } 281 } 282 }, 283 284 has: { 285 direction: function(animation) { 286 var 287 hasDirection = false 288 ; 289 animation = animation || settings.animation; 290 if(typeof animation === 'string') { 291 animation = animation.split(' '); 292 $.each(animation, function(index, word){ 293 if(word === className.inward || word === className.outward) { 294 hasDirection = true; 295 } 296 }); 297 } 298 return hasDirection; 299 }, 300 inlineDisplay: function() { 301 var 302 style = $module.attr('style') || '' 303 ; 304 return $.isArray(style.match(/display.*?;/, '')); 305 } 306 }, 307 308 set: { 309 animating: function(animation) { 310 var 311 animationClass, 312 direction 313 ; 314 // remove previous callbacks 315 module.remove.completeCallback(); 316 317 // determine exact animation 318 animation = animation || settings.animation; 319 animationClass = module.get.animationClass(animation); 320 321 // save animation class in cache to restore class names 322 module.save.animation(animationClass); 323 324 // override display if necessary so animation appears visibly 325 module.force.visible(); 326 327 module.remove.hidden(); 328 module.remove.direction(); 329 330 module.start.animation(animationClass); 331 332 }, 333 duration: function(animationName, duration) { 334 duration = duration || settings.duration; 335 duration = (typeof duration == 'number') 336 ? duration + 'ms' 337 : duration 338 ; 339 if(duration || duration === 0) { 340 module.verbose('Setting animation duration', duration); 341 $module 342 .css({ 343 'animation-duration': duration 344 }) 345 ; 346 } 347 }, 348 direction: function(direction) { 349 direction = direction || module.get.direction(); 350 if(direction == className.inward) { 351 module.set.inward(); 352 } 353 else { 354 module.set.outward(); 355 } 356 }, 357 looping: function() { 358 module.debug('Transition set to loop'); 359 $module 360 .addClass(className.looping) 361 ; 362 }, 363 hidden: function() { 364 $module 365 .addClass(className.transition) 366 .addClass(className.hidden) 367 ; 368 }, 369 inward: function() { 370 module.debug('Setting direction to inward'); 371 $module 372 .removeClass(className.outward) 373 .addClass(className.inward) 374 ; 375 }, 376 outward: function() { 377 module.debug('Setting direction to outward'); 378 $module 379 .removeClass(className.inward) 380 .addClass(className.outward) 381 ; 382 }, 383 visible: function() { 384 $module 385 .addClass(className.transition) 386 .addClass(className.visible) 387 ; 388 } 389 }, 390 391 start: { 392 animation: function(animationClass) { 393 animationClass = animationClass || module.get.animationClass(); 394 module.debug('Starting tween', animationClass); 395 $module 396 .addClass(animationClass) 397 .one(animationEnd + '.complete' + eventNamespace, module.complete) 398 ; 399 if(settings.useFailSafe) { 400 module.add.failSafe(); 401 } 402 module.set.duration(settings.duration); 403 settings.onStart.call(element); 404 } 405 }, 406 407 save: { 408 animation: function(animation) { 409 if(!module.cache) { 410 module.cache = {}; 411 } 412 module.cache.animation = animation; 413 }, 414 displayType: function(displayType) { 415 if(displayType !== 'none') { 416 $module.data(metadata.displayType, displayType); 417 } 418 }, 419 transitionExists: function(animation, exists) { 420 $.fn.transition.exists[animation] = exists; 421 module.verbose('Saving existence of transition', animation, exists); 422 } 423 }, 424 425 restore: { 426 conditions: function() { 427 var 428 animation = module.get.currentAnimation() 429 ; 430 if(animation) { 431 $module 432 .removeClass(animation) 433 ; 434 module.verbose('Removing animation class', module.cache); 435 } 436 module.remove.duration(); 437 } 438 }, 439 440 add: { 441 failSafe: function() { 442 var 443 duration = module.get.duration() 444 ; 445 module.timer = setTimeout(function() { 446 $module.triggerHandler(animationEnd); 447 }, duration + settings.failSafeDelay); 448 module.verbose('Adding fail safe timer', module.timer); 449 } 450 }, 451 452 remove: { 453 animating: function() { 454 $module.removeClass(className.animating); 455 }, 456 animationCallbacks: function() { 457 module.remove.queueCallback(); 458 module.remove.completeCallback(); 459 }, 460 queueCallback: function() { 461 $module.off('.queue' + eventNamespace); 462 }, 463 completeCallback: function() { 464 $module.off('.complete' + eventNamespace); 465 }, 466 display: function() { 467 $module.css('display', ''); 468 }, 469 direction: function() { 470 $module 471 .removeClass(className.inward) 472 .removeClass(className.outward) 473 ; 474 }, 475 duration: function() { 476 $module 477 .css('animation-duration', '') 478 ; 479 }, 480 failSafe: function() { 481 module.verbose('Removing fail safe timer', module.timer); 482 if(module.timer) { 483 clearTimeout(module.timer); 484 } 485 }, 486 hidden: function() { 487 $module.removeClass(className.hidden); 488 }, 489 visible: function() { 490 $module.removeClass(className.visible); 491 }, 492 looping: function() { 493 module.debug('Transitions are no longer looping'); 494 if( module.is.looping() ) { 495 module.reset(); 496 $module 497 .removeClass(className.looping) 498 ; 499 } 500 }, 501 transition: function() { 502 $module 503 .removeClass(className.visible) 504 .removeClass(className.hidden) 505 ; 506 } 507 }, 508 get: { 509 settings: function(animation, duration, onComplete) { 510 // single settings object 511 if(typeof animation == 'object') { 512 return $.extend(true, {}, $.fn.transition.settings, animation); 513 } 514 // all arguments provided 515 else if(typeof onComplete == 'function') { 516 return $.extend({}, $.fn.transition.settings, { 517 animation : animation, 518 onComplete : onComplete, 519 duration : duration 520 }); 521 } 522 // only duration provided 523 else if(typeof duration == 'string' || typeof duration == 'number') { 524 return $.extend({}, $.fn.transition.settings, { 525 animation : animation, 526 duration : duration 527 }); 528 } 529 // duration is actually settings object 530 else if(typeof duration == 'object') { 531 return $.extend({}, $.fn.transition.settings, duration, { 532 animation : animation 533 }); 534 } 535 // duration is actually callback 536 else if(typeof duration == 'function') { 537 return $.extend({}, $.fn.transition.settings, { 538 animation : animation, 539 onComplete : duration 540 }); 541 } 542 // only animation provided 543 else { 544 return $.extend({}, $.fn.transition.settings, { 545 animation : animation 546 }); 547 } 548 }, 549 animationClass: function(animation) { 550 var 551 animationClass = animation || settings.animation, 552 directionClass = (module.can.transition() && !module.has.direction()) 553 ? module.get.direction() + ' ' 554 : '' 555 ; 556 return className.animating + ' ' 557 + className.transition + ' ' 558 + directionClass 559 + animationClass 560 ; 561 }, 562 currentAnimation: function() { 563 return (module.cache && module.cache.animation !== undefined) 564 ? module.cache.animation 565 : false 566 ; 567 }, 568 currentDirection: function() { 569 return module.is.inward() 570 ? className.inward 571 : className.outward 572 ; 573 }, 574 direction: function() { 575 return module.is.hidden() || !module.is.visible() 576 ? className.inward 577 : className.outward 578 ; 579 }, 580 animationDirection: function(animation) { 581 var 582 direction 583 ; 584 animation = animation || settings.animation; 585 if(typeof animation === 'string') { 586 animation = animation.split(' '); 587 // search animation name for out/in class 588 $.each(animation, function(index, word){ 589 if(word === className.inward) { 590 direction = className.inward; 591 } 592 else if(word === className.outward) { 593 direction = className.outward; 594 } 595 }); 596 } 597 // return found direction 598 if(direction) { 599 return direction; 600 } 601 return false; 602 }, 603 duration: function(duration) { 604 duration = duration || settings.duration; 605 if(duration === false) { 606 duration = $module.css('animation-duration') || 0; 607 } 608 return (typeof duration === 'string') 609 ? (duration.indexOf('ms') > -1) 610 ? parseFloat(duration) 611 : parseFloat(duration) * 1000 612 : duration 613 ; 614 }, 615 displayType: function(shouldDetermine) { 616 shouldDetermine = (shouldDetermine !== undefined) 617 ? shouldDetermine 618 : true 619 ; 620 if(settings.displayType) { 621 return settings.displayType; 622 } 623 if(shouldDetermine && $module.data(metadata.displayType) === undefined) { 624 // create fake element to determine display state 625 module.can.transition(true); 626 } 627 return $module.data(metadata.displayType); 628 }, 629 userStyle: function(style) { 630 style = style || $module.attr('style') || ''; 631 return style.replace(/display.*?;/, ''); 632 }, 633 transitionExists: function(animation) { 634 return $.fn.transition.exists[animation]; 635 }, 636 animationStartEvent: function() { 637 var 638 element = document.createElement('div'), 639 animations = { 640 'animation' :'animationstart', 641 'OAnimation' :'oAnimationStart', 642 'MozAnimation' :'mozAnimationStart', 643 'WebkitAnimation' :'webkitAnimationStart' 644 }, 645 animation 646 ; 647 for(animation in animations){ 648 if( element.style[animation] !== undefined ){ 649 return animations[animation]; 650 } 651 } 652 return false; 653 }, 654 animationEndEvent: function() { 655 var 656 element = document.createElement('div'), 657 animations = { 658 'animation' :'animationend', 659 'OAnimation' :'oAnimationEnd', 660 'MozAnimation' :'mozAnimationEnd', 661 'WebkitAnimation' :'webkitAnimationEnd' 662 }, 663 animation 664 ; 665 for(animation in animations){ 666 if( element.style[animation] !== undefined ){ 667 return animations[animation]; 668 } 669 } 670 return false; 671 } 672 673 }, 674 675 can: { 676 transition: function(forced) { 677 var 678 animation = settings.animation, 679 transitionExists = module.get.transitionExists(animation), 680 displayType = module.get.displayType(false), 681 elementClass, 682 tagName, 683 $clone, 684 currentAnimation, 685 inAnimation, 686 directionExists 687 ; 688 if( transitionExists === undefined || forced) { 689 module.verbose('Determining whether animation exists'); 690 elementClass = $module.attr('class'); 691 tagName = $module.prop('tagName'); 692 693 $clone = $('<' + tagName + ' />').addClass( elementClass ).insertAfter($module); 694 currentAnimation = $clone 695 .addClass(animation) 696 .removeClass(className.inward) 697 .removeClass(className.outward) 698 .addClass(className.animating) 699 .addClass(className.transition) 700 .css('animationName') 701 ; 702 inAnimation = $clone 703 .addClass(className.inward) 704 .css('animationName') 705 ; 706 if(!displayType) { 707 displayType = $clone 708 .attr('class', elementClass) 709 .removeAttr('style') 710 .removeClass(className.hidden) 711 .removeClass(className.visible) 712 .show() 713 .css('display') 714 ; 715 module.verbose('Determining final display state', displayType); 716 module.save.displayType(displayType); 717 } 718 719 $clone.remove(); 720 if(currentAnimation != inAnimation) { 721 module.debug('Direction exists for animation', animation); 722 directionExists = true; 723 } 724 else if(currentAnimation == 'none' || !currentAnimation) { 725 module.debug('No animation defined in css', animation); 726 return; 727 } 728 else { 729 module.debug('Static animation found', animation, displayType); 730 directionExists = false; 731 } 732 module.save.transitionExists(animation, directionExists); 733 } 734 return (transitionExists !== undefined) 735 ? transitionExists 736 : directionExists 737 ; 738 }, 739 animate: function() { 740 // can transition does not return a value if animation does not exist 741 return (module.can.transition() !== undefined); 742 } 743 }, 744 745 is: { 746 animating: function() { 747 return $module.hasClass(className.animating); 748 }, 749 inward: function() { 750 return $module.hasClass(className.inward); 751 }, 752 outward: function() { 753 return $module.hasClass(className.outward); 754 }, 755 looping: function() { 756 return $module.hasClass(className.looping); 757 }, 758 occurring: function(animation) { 759 animation = animation || settings.animation; 760 animation = '.' + animation.replace(' ', '.'); 761 return ( $module.filter(animation).length > 0 ); 762 }, 763 visible: function() { 764 return $module.is(':visible'); 765 }, 766 hidden: function() { 767 return $module.css('visibility') === 'hidden'; 768 }, 769 supported: function() { 770 return(animationEnd !== false); 771 } 772 }, 773 774 hide: function() { 775 module.verbose('Hiding element'); 776 if( module.is.animating() ) { 777 module.reset(); 778 } 779 element.blur(); // IE will trigger focus change if element is not blurred before hiding 780 module.remove.display(); 781 module.remove.visible(); 782 module.set.hidden(); 783 module.force.hidden(); 784 settings.onHide.call(element); 785 settings.onComplete.call(element); 786 // module.repaint(); 787 }, 788 789 show: function(display) { 790 module.verbose('Showing element', display); 791 module.remove.hidden(); 792 module.set.visible(); 793 module.force.visible(); 794 settings.onShow.call(element); 795 settings.onComplete.call(element); 796 // module.repaint(); 797 }, 798 799 toggle: function() { 800 if( module.is.visible() ) { 801 module.hide(); 802 } 803 else { 804 module.show(); 805 } 806 }, 807 808 stop: function() { 809 module.debug('Stopping current animation'); 810 $module.triggerHandler(animationEnd); 811 }, 812 813 stopAll: function() { 814 module.debug('Stopping all animation'); 815 module.remove.queueCallback(); 816 $module.triggerHandler(animationEnd); 817 }, 818 819 clear: { 820 queue: function() { 821 module.debug('Clearing animation queue'); 822 module.remove.queueCallback(); 823 } 824 }, 825 826 enable: function() { 827 module.verbose('Starting animation'); 828 $module.removeClass(className.disabled); 829 }, 830 831 disable: function() { 832 module.debug('Stopping animation'); 833 $module.addClass(className.disabled); 834 }, 835 836 setting: function(name, value) { 837 module.debug('Changing setting', name, value); 838 if( $.isPlainObject(name) ) { 839 $.extend(true, settings, name); 840 } 841 else if(value !== undefined) { 842 if($.isPlainObject(settings[name])) { 843 $.extend(true, settings[name], value); 844 } 845 else { 846 settings[name] = value; 847 } 848 } 849 else { 850 return settings[name]; 851 } 852 }, 853 internal: function(name, value) { 854 if( $.isPlainObject(name) ) { 855 $.extend(true, module, name); 856 } 857 else if(value !== undefined) { 858 module[name] = value; 859 } 860 else { 861 return module[name]; 862 } 863 }, 864 debug: function() { 865 if(!settings.silent && settings.debug) { 866 if(settings.performance) { 867 module.performance.log(arguments); 868 } 869 else { 870 module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':'); 871 module.debug.apply(console, arguments); 872 } 873 } 874 }, 875 verbose: function() { 876 if(!settings.silent && settings.verbose && settings.debug) { 877 if(settings.performance) { 878 module.performance.log(arguments); 879 } 880 else { 881 module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':'); 882 module.verbose.apply(console, arguments); 883 } 884 } 885 }, 886 error: function() { 887 if(!settings.silent) { 888 module.error = Function.prototype.bind.call(console.error, console, settings.name + ':'); 889 module.error.apply(console, arguments); 890 } 891 }, 892 performance: { 893 log: function(message) { 894 var 895 currentTime, 896 executionTime, 897 previousTime 898 ; 899 if(settings.performance) { 900 currentTime = new Date().getTime(); 901 previousTime = time || currentTime; 902 executionTime = currentTime - previousTime; 903 time = currentTime; 904 performance.push({ 905 'Name' : message[0], 906 'Arguments' : [].slice.call(message, 1) || '', 907 'Element' : element, 908 'Execution Time' : executionTime 909 }); 910 } 911 clearTimeout(module.performance.timer); 912 module.performance.timer = setTimeout(module.performance.display, 500); 913 }, 914 display: function() { 915 var 916 title = settings.name + ':', 917 totalTime = 0 918 ; 919 time = false; 920 clearTimeout(module.performance.timer); 921 $.each(performance, function(index, data) { 922 totalTime += data['Execution Time']; 923 }); 924 title += ' ' + totalTime + 'ms'; 925 if(moduleSelector) { 926 title += ' \'' + moduleSelector + '\''; 927 } 928 if($allModules.length > 1) { 929 title += ' ' + '(' + $allModules.length + ')'; 930 } 931 if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { 932 console.groupCollapsed(title); 933 if(console.table) { 934 console.table(performance); 935 } 936 else { 937 $.each(performance, function(index, data) { 938 console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); 939 }); 940 } 941 console.groupEnd(); 942 } 943 performance = []; 944 } 945 }, 946 // modified for transition to return invoke success 947 invoke: function(query, passedArguments, context) { 948 var 949 object = instance, 950 maxDepth, 951 found, 952 response 953 ; 954 passedArguments = passedArguments || queryArguments; 955 context = element || context; 956 if(typeof query == 'string' && object !== undefined) { 957 query = query.split(/[\. ]/); 958 maxDepth = query.length - 1; 959 $.each(query, function(depth, value) { 960 var camelCaseValue = (depth != maxDepth) 961 ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1) 962 : query 963 ; 964 if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) { 965 object = object[camelCaseValue]; 966 } 967 else if( object[camelCaseValue] !== undefined ) { 968 found = object[camelCaseValue]; 969 return false; 970 } 971 else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) { 972 object = object[value]; 973 } 974 else if( object[value] !== undefined ) { 975 found = object[value]; 976 return false; 977 } 978 else { 979 return false; 980 } 981 }); 982 } 983 if ( $.isFunction( found ) ) { 984 response = found.apply(context, passedArguments); 985 } 986 else if(found !== undefined) { 987 response = found; 988 } 989 990 if($.isArray(returnedValue)) { 991 returnedValue.push(response); 992 } 993 else if(returnedValue !== undefined) { 994 returnedValue = [returnedValue, response]; 995 } 996 else if(response !== undefined) { 997 returnedValue = response; 998 } 999 return (found !== undefined) 1000 ? found 1001 : false 1002 ; 1003 } 1004 }; 1005 module.initialize(); 1006 }) 1007 ; 1008 return (returnedValue !== undefined) 1009 ? returnedValue 1010 : this 1011 ; 1012}; 1013 1014// Records if CSS transition is available 1015$.fn.transition.exists = {}; 1016 1017$.fn.transition.settings = { 1018 1019 // module info 1020 name : 'Transition', 1021 1022 // hide all output from this component regardless of other settings 1023 silent : false, 1024 1025 // debug content outputted to console 1026 debug : false, 1027 1028 // verbose debug output 1029 verbose : false, 1030 1031 // performance data output 1032 performance : true, 1033 1034 // event namespace 1035 namespace : 'transition', 1036 1037 // delay between animations in group 1038 interval : 0, 1039 1040 // whether group animations should be reversed 1041 reverse : 'auto', 1042 1043 // animation callback event 1044 onStart : function() {}, 1045 onComplete : function() {}, 1046 onShow : function() {}, 1047 onHide : function() {}, 1048 1049 // whether timeout should be used to ensure callback fires in cases animationend does not 1050 useFailSafe : true, 1051 1052 // delay in ms for fail safe 1053 failSafeDelay : 100, 1054 1055 // whether EXACT animation can occur twice in a row 1056 allowRepeats : false, 1057 1058 // Override final display type on visible 1059 displayType : false, 1060 1061 // animation duration 1062 animation : 'fade', 1063 duration : false, 1064 1065 // new animations will occur after previous ones 1066 queue : true, 1067 1068 metadata : { 1069 displayType: 'display' 1070 }, 1071 1072 className : { 1073 animating : 'animating', 1074 disabled : 'disabled', 1075 hidden : 'hidden', 1076 inward : 'in', 1077 loading : 'loading', 1078 looping : 'looping',
1079 outward : 'out', 1080 transition : 'transition', 1081 visible : 'visible' 1082 }, 1083 1084 // possible errors 1085 error: { 1086 noAnimation : 'Element is no longer attached to DOM. Unable to animate. Use silent setting to surpress this warning in production.', 1087 repeated : 'That animation is already occurring, cancelling repeated animation', 1088 method : 'The method you called is not defined', 1089 support : 'This browser does not support CSS animations' 1090 } 1091 1092}; 1093 1094 1095})( jQuery, window, document );
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.