PageSourceSearch

https://www.knoenerullmann.de/_ui/responsive/common/js/jquery.slideviewer.custom.1.2.js

js knoenerullmann.de collected 2026-10-07 04:34:07 UTC 4,822 bytes, 136 lines download raw bytes

1/*!
2 * slideViewer 1.2 CUSTOM
3 * Examples and documentation at: 
4 * http://www.gcmingati.net/wordpress/wp-content/lab/jquery/imagestrip/imageslide-plugin.html
5 * 2007-2010 Gian Carlo Mingati
6 * Version: 1.2.3 (9-JULY-2010)
7 * Dual licensed under the MIT and GPL licenses:
8 * http://www.opensource.org/licenses/mit-license.php
9 * http://www.gnu.org/licenses/gpl.html
10 * 
11 * Requires:
12 * jQuery v1.4.1 or later, jquery.easing.1.2
13 * 
14 *
15 * --- Additional autoslide functionality was implemented by SNK Interactive ---  
16 */
17
18jQuery(function(){
19	jQuery("div.svw").prepend("<img src='" + ACC.config.commonResourcePath + "/images/spinner.gif' class='ldrgif' alt='loading...'/ >");
20});
21var j = 0;
22var quantofamo = 0;
23var currentActive = 0;
24var total = 0;
25var listelements = [];
26
27jQuery.fn.slideView = function(settings) {
28	settings = jQuery.extend({
29		easeFunc: "easeInOutExpo",
30		easeTime: 750,
31		uiBefore: false,
32		toolTip: false,
33		ttOpacity: 0.9,
34		autoPlay: false,
35		autoPlayTime: '8000'
36	}, settings);
37	return this.each(function(){
38		var container = jQuery(this);
39		container.find("img.ldrgif").remove();
40		container.removeClass("svw").addClass("stripViewer");
41		container.find("img").each(function () {
42			$(this).css("width" , container.width())
43		})
44		var pictWidth = container.find("img").width();
45		var pictHeight = container.find("img").height();
46		var pictEls = container.find("li").length;
47		var stripViewerWidth = container.width()*pictEls;
48		container.find("ul").css("width" , stripViewerWidth);
49		container.css("height" , pictHeight);
50		container.each(function(i) {
51			(!settings.uiBefore) ? jQuery(this).after("<div class='stripTransmitter' id='stripTransmitter" + (j) + "'><ul><\/ul><\/div>") : jQuery(this).before("<div class='stripTransmitter' id='stripTransmitter" + (j) + "'><ul><\/ul><\/div>");
52			jQuery(this).find("li").each(function(n) {
53				jQuery("div#stripTransmitter" + j + " ul").append("<li><a title='" + jQuery(this).find("img").attr("alt") + "' href='#'><span class=\"swiper-pagination-bullet\"></span><\/a><\/li>");
54			});
55			jQuery("div#stripTransmitter" + j + " a").each(function(z) {
56
57				jQuery(this).bind("click", function(){
58					slide(jQuery(this),  z);
59					return false;
60				});
61
62				listelements.push(jQuery(this));
63				total++;
64			});
65
66			$(window).resize(function(){
67				container.find("img").each(function () {
68					$(this).css("width" , container.width())
69				})
70
71				pictWidth = container.find("img").width();
72				pictHeight = container.find("img").height();
73				stripViewerWidth = container.width()*pictEls;
74				container.find("ul").css("width" , stripViewerWidth);
75				container.css("height" , pictHeight);
76			});
77
78
79			function slide(target, z){
80				target.addClass("current").parent().parent().find("a").not(target).removeClass("current"); // wow!
81				currentActive = z;
82				var cnt = -(pictWidth*z);
83				container.find("ul").animate({ left: cnt}, settings.easeTime, settings.easeFunc);
84			}
85
86
87			container.bind("click", function(e){
88				var ui = (!settings.uiBefore) ? jQuery(this).next().find("a.current") : jQuery(this).prev().find("a.current");
89				var bTotal = parseFloat(jQuery(this).css('borderLeftWidth').replace("px", "")) +  parseFloat(jQuery(this).css('borderRightWidth').replace("px", ""));
90				var dOs = jQuery(this).offset();
91				var zeroLeft = (bTotal/2 + pictWidth) - (e.pageX - dOs.left);
92				if(zeroLeft >= pictWidth/2) {
93					var uiprev = ui.parent().prev().find("a");
94					(jQuery(uiprev).length != 0)? uiprev.trigger("click") : ui.parent().parent().find("a:last").trigger("click");
95				}
96				else {
97					var uinext = ui.parent().next().find("a");
98					(jQuery(uinext).length != 0)? uinext.trigger("click") : ui.parent().parent().find("a:first").trigger("click");
99				}
100			});
101
102
103			jQuery("div#stripTransmitter" + j + " a:first").addClass("current");
104			jQuery('body').append('<div class="tooltip" style="display:none;"><\/div>');
105
106			if(settings.autoPlay){
107				var slideOn = setInterval(function() { slide(( total > currentActive+1) ?  listelements[currentActive+1] : listelements[0], ( total > currentActive+1) ?  currentActive+1 : 0)},settings.autoPlayTime);
108			}
109
110
111			if(settings.toolTip){
112				var aref = jQuery("div#stripTransmitter" + j + " a");
113				aref.each(function() {
114					jQuery(this).data("title", jQuery(this).prop("title"));
115				});
116
117				aref.on('mousemove', function(e) {
118					var att = jQuery(this).data('title');
119					posX=e.pageX+10;
120					posY=e.pageY+10;
121					jQuery('.tooltip').html(att).css({'position': 'absolute', 'top': posY+'px', 'left': posX+'px', 'display': 'block', 'opacity': settings.ttOpacity});
122				});
123				aref.on('mouseout', function() {
124					jQuery('.tooltip').hide();
125					this.title = jQuery(this).data("title");
126				});
127				aref.on('mouseover', function() {
128					this.title = '';
129				});
130			}
131		});
132		j++;
133
134	});
135
136};

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.