PageSourceSearch

https://gakken-juku.com/common/js/imgchange.js

js gakken-juku.com collected 2026-10-05 10:50:53 UTC 5,933 bytes, 165 lines download raw bytes

1
2//TOpgra画像切り替え
3$(function ImgChange() {
4	
5	
6	//デフォルト
7	//$(".tpmaingrbx").hide().fadeIn(1000);
8	$(".tpmaingrbx ul.in li.lt:first-child").addClass("on");
9
10	//next
11	$(".tpmaingrbx ul.in li.lt").removeClass("nt");
12	if($('.tpmaingrbx ul.in li.lt:last-child').is(".on")){
13		$(".tpmaingrbx ul.in li.lt:first-child").addClass("nt");
14	} else {
15		$(".tpmaingrbx ul.in li.lt.on").next("li").addClass("nt");
16	}
17                		
18
19	//初期画像データ
20	Change();
21	//切り替え
22	function Change() {	
23		
24		$('.tpmaingrbx:not(:animated)').animate({"opacity": "1"}, 4000).animate({"opacity": "1"}, 1000,"",function(){
25
26	    	if($('.tpmaingrbx ul.in li.lt.on').prev("li").is('.nt') ||
27	    	($('.tpmaingrbx ul.in li.lt.on').is(':first-child') && $('.tpmaingrbx ul.in li.lt.nt').is(':last-child'))){
28	        	$(".tpmaingrbx ul.in li.lt").removeClass("nt");
29	    		if($('.tpmaingrbx ul.in li.lt:last-child').is(".on")){
30	        		$(".tpmaingrbx ul.in li.lt:first-child").addClass("nt");
31	    		} else {
32	        		$(".tpmaingrbx ul.in li.lt.on").next("li").addClass("nt");
33	    		}
34	    	}
35    	
36		
37		}).animate({"opacity": "1"}, 100,function(){
38    		$('.tpmaingrbx ul.in li.lt.on').animate({"opacity": "0"}, 1500,"",
39    			function(){
40    			    
41    			    if($('.tpmaingrbx ul.in li.lt:last-child').is(".on")){
42    			        $('.tpmaingrbx ul.in li.lt.on').removeClass("on");
43    			        $('.tpmaingrbx ul.in li.lt:first-child').addClass("on");
44    			    } else {
45    			        $('.tpmaingrbx ul.in li.lt.on').removeClass("on").next(".lt").addClass("on");
46    			    }
47    			    
48    			    $('.tpmaingrbx ul.in li.lt').css("opacity","1");
49    			    
50
51                	//next
52                	$(".tpmaingrbx ul.in li.lt").removeClass("nt");
53            		if($('.tpmaingrbx ul.in li.lt:last-child').is(".on")){
54                		$(".tpmaingrbx ul.in li.lt:first-child").addClass("nt");
55            		} else {
56                		$(".tpmaingrbx ul.in li.lt.on").next("li").addClass("nt");
57            		}
58                		
59    			    if($('.tpmaingrbx').is(".stop")){
60                		
61    			    } else {
62
63    			        Change();
64    			    }
65    		});
66		});
67	}
68
69	
70	//ページャー
71	if($('.tpmaingrbx ul.in li.lt').is(":not(:animated)")){
72    	$(".tpmaingrbx ul.pager .prv a").click(function(){
73
74        	if($('.tpmaingrbx').is(':not(:animated)')){
75            	if($('.tpmaingrbx ul.in li.lt.on').is(':not(:animated)')){
76                	$(".tpmaingrbx ul.in li.lt").removeClass("nt");
77                	if($('.tpmaingrbx ul.in li.lt:first-child').is(".on")){
78                		$(".tpmaingrbx ul.in li.lt:last-child").addClass("nt");
79                	} else {
80                		$(".tpmaingrbx ul.in li.lt.on").prev("li").addClass("nt");
81                	}
82            	}
83        	
84        	    $('.tpmaingrbx ul.in li.lt.on:not(:animated)').stop(true, true).animate({"opacity": "0"}, 1500,"",
85            	    function(){
86                	    if($('.tpmaingrbx ul.in li.lt:first-child').is(".on")){
87                	        $('.tpmaingrbx ul.in li.lt.on').removeClass("on");
88                	        $('.tpmaingrbx ul.in li.lt:last-child').addClass("on");
89                	    } else {
90                	        $('.tpmaingrbx ul.in li.lt.on').removeClass("on").prev(".lt").addClass("on");
91                	    }
92                	    $('.tpmaingrbx ul.in li.lt').css("opacity","1");
93
94                    	$(".tpmaingrbx ul.in li.lt").removeClass("nt");
95                    	if($('.tpmaingrbx ul.in li.lt:first-child').is(".on")){
96                    		$(".tpmaingrbx ul.in li.lt:last-child").addClass("nt");
97                    	} else {
98                    		$(".tpmaingrbx ul.in li.lt.on").prev("li").addClass("nt");
99                    	}
100                    	
101            	    });
102            }
103    		return false;
104
105    	});;
106    
107    }
108	if($('.tpmaingrbx ul.in li.lt').is(":not(:animated)")){
109    	$(".tpmaingrbx ul.pager .nxt a").click(function(){
110
111        	if($('.tpmaingrbx').is(':not(:animated)')){
112            	if($('.tpmaingrbx ul.in li.lt.on').is(':not(:animated)')){
113                	$(".tpmaingrbx ul.in li.lt").removeClass("nt");
114            		if($('.tpmaingrbx ul.in li.lt:last-child').is(".on")){
115                		$(".tpmaingrbx ul.in li.lt:first-child").addClass("nt");
116            		} else {
117                		$(".tpmaingrbx ul.in li.lt.on").next("li").addClass("nt");
118            		}
119        		}
120        		
121        	    $('.tpmaingrbx ul.in li.lt.on:not(:animated)').stop(true, true).animate({"opacity": "0"}, 1500,"",
122            	    function(){
123                	    if($('.tpmaingrbx ul.in li.lt:last-child').is(".on")){
124                	        $('.tpmaingrbx ul.in li.lt.on').removeClass("on");
125                	        $('.tpmaingrbx ul.in li.lt:first-child').addClass("on");
126                	    } else {
127                	        $('.tpmaingrbx ul.in li.lt.on').removeClass("on").next(".lt").addClass("on");
128                	    }
129                	    $('.tpmaingrbx ul.in li.lt').css("opacity","1");
130
131                    	$(".tpmaingrbx ul.in li.lt").removeClass("nt");
132                		if($('.tpmaingrbx ul.in li.lt:last-child').is(".on")){
133                    		$(".tpmaingrbx ul.in li.lt:first-child").addClass("nt");
134                		} else {
135                    		$(".tpmaingrbx ul.in li.lt.on").next("li").addClass("nt");
136                		}
137		
138            	    });
139            }
140    		return false;
141
142    	});
143    
144    }
145    
146/*
147	$(".tpmaingrbx").hover(function(){
148		$(".tpmaingrbx").addClass("stop");
149		$(".tpmaingrbx").stop(true, true);
150	},function(){
151		$(".tpmaingrbx").removeClass("stop");                		
152		Change();
153	});
154*/
155	$(".tpmaingrbx").mouseover(function(){
156		$(".tpmaingrbx").addClass("stop");
157		$(".tpmaingrbx").stop(true, true);
158	});
159	$(".tpmaingrbx").mouseout(function(){
160		$(".tpmaingrbx").removeClass("stop");                		
161		Change();
162	});
163
164
165});

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.