vendor: 1,933 bytes, lines 1-76
1/*! 2 * jQuery UI Effects Slide 1.12.1 3 * http://jqueryui.com 4 * 5 * Copyright jQuery Foundation and other contributors 6 * Released under the MIT license. 7 * http://jquery.org/license 8 */ 9 10//>>label: Slide Effect 11//>>group: Effects 12//>>description: Slides an element in and out of the viewport. 13//>>docs: http://api.jqueryui.com/slide-effect/ 14//>>demos: http://jqueryui.com/effect/ 15 16( function( factory ) { 17 if ( typeof define === "function" && define.amd ) { 18 19 // AMD. Register as an anonymous module. 20 define( [ 21 "jquery", 22 "../version", 23 "../effect" 24 ], factory ); 25 } else { 26 27 // Browser globals 28 factory( jQuery ); 29 } 30}( function( $ ) { 31 32return $.effects.define( "slide", "show", function( options, done ) { 33 var startClip, startRef, 34 element = $( this ), 35 map = { 36 up: [ "bottom", "top" ], 37 down: [ "top", "bottom" ], 38 left: [ "right", "left" ], 39 right: [ "left", "right" ] 40 }, 41 mode = options.mode, 42 direction = options.direction || "left", 43 ref = ( direction === "up" || direction === "down" ) ? "top" : "left", 44 positiveMotion = ( direction === "up" || direction === "left" ), 45 distance = options.distance || 46 element[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ), 47 animation = {}; 48 49 $.effects.createPlaceholder( element ); 50 51 startClip = element.cssClip(); 52 startRef = element.position()[ ref ]; 53 54 // Define hide animation 55 animation[ ref ] = ( positiveMotion ? -1 : 1 ) * distance + startRef; 56 animation.clip = element.cssClip(); 57 animation.clip[ map[ direction ][ 1 ] ] = animation.clip[ map[ direction ][ 0 ] ]; 58 59 // Reverse the animation if we're showing 60 if ( mode === "show" ) { 61 element.cssClip( animation.clip ); 62 element.css( ref, animation[ ref ] ); 63 animation.clip = startClip; 64 animation[ ref ] = startRef; 65 } 66 67 // Actually animate 68 element.animate( animation, { 69 queue: false, 70 duration: options.duration, 71 easing: options.easing, 72 complete: done 73 } ); 74} ); 75 76} ) );
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.