PageSourceSearch

https://zlatanibrahimovic.com/js/featureList.js

js zlatanibrahimovic.com collected 2026-10-02 23:58:38 UTC 1,804 bytes, 70 lines download raw bytes

1/*
2 * FeatureList - simple and easy creation of an interactive "Featured Items" widget
3 * Examples and documentation at: http://jqueryglobe.com/article/feature_list/
4 * Version: 1.0.0 (01/09/2009)
5 * Copyright (c) 2009 jQueryGlobe
6 * Licensed under the MIT License: http://en.wikipedia.org/wiki/MIT_License
7 * Requires: jQuery v1.3+
8*/
9;(function($) {
10	$.fn.featureList = function(options) {
11		var tabs	= $(this);
12		var output	= $(options.output);
13
14		new jQuery.featureList(tabs, output, options);
15
16		return this;	
17	};
18
19	$.featureList = function(tabs, output, options) {
20		function slide(nr) {
21			if (typeof nr == "undefined") {
22				nr = visible_item + 1;
23				nr = nr >= total_items ? 0 : nr;
24			}
25
26			tabs.removeClass('current').filter(":eq(" + nr + ")").addClass('current');
27
28			output.stop(true, true).filter(":visible").fadeOut();
29			output.filter(":eq(" + nr + ")").fadeIn(function() {
30				visible_item = nr;	
31			});
32		}
33
34		var options			= options || {}; 
35		var total_items		= tabs.length;
36		var visible_item	= options.start_item || 0;
37
38		options.pause_on_hover		= options.pause_on_hover		|| true;
39		options.transition_interval	= options.transition_interval	|| 10000;
40
41		output.hide().eq( visible_item ).show();
42		tabs.eq( visible_item ).addClass('current');
43
44		tabs.click(function() {
45			if ($(this).hasClass('current')) {
46				return false;	
47			}
48
49			slide( tabs.index( this) );
50		});
51
52		if (options.transition_interval > 0) {
53			var timer = setInterval(function () {
54				slide();
55			}, options.transition_interval);
56
57			if (options.pause_on_hover) {
58				tabs.mouseenter(function() {
59					clearInterval( timer );
60
61				}).mouseleave(function() {
62					clearInterval( timer );
63					timer = setInterval(function () {
64						slide();
65					}, options.transition_interval);
66				});
67			}
68		}
69	};
70})(jQuery);

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.