PageSourceSearch

http://www.moe.gov.cn/images/m_index.js

js moe.gov.cn collected 2026-09-24 08:39:14 UTC 7,619 bytes, 266 lines download raw bytes

1!function setDateFun(){
2	var _time=new Date(),_year=_time.getFullYear(),_month=_time.getMonth()+1,_date=_time.getDate(),_work='',_hours=_time.getHours(),_minutes=_time.getMinutes()>=10?_time.getMinutes():'0'+_time.getMinutes();
3	switch(_time.getDay()){
4		case 0:_work='星期日';break;
5		case 1:_work='星期一';break;
6		case 2:_work='星期二';break;
7		case 3:_work='星期三';break;
8		case 4:_work='星期四';break;
9		case 5:_work='星期五';break;
10		case 6:_work='星期六';break;
11	}
12	$('#dateFun').html(_year+'年'+_month+'月'+_date+'日 '+_work);
13}()
14
15
16/*小屏顶部导航开始*/
17var initialSlide=$(".m_top_nav li").index($(".m_top_nav li.cur"));
18if($('.swiper_container_top_nav').size()>0){
19
20	var mySwiperNav = new Swiper('.swiper_container_top_nav',{
21		freeMode : true,
22    	freeModeFluid : true,
23		calculateHeight : true,
24		slidesPerView : 'auto',
25		cssWidthAndHeight : true,
26		initialSlide : initialSlide,
27	    onFirstInit: function(swiper){
28		  if ($(".m_top_nav li").index($(".m_top_nav li.cur")) >= $(".m_top_nav li").size() -6) {
29				$('#m_nav_mask_fun').hide();
30		  }
31		  else {
32				$('#m_nav_mask_fun_left').hide();
33		  } 
34	      holdPosition=0,mySwiperNavTimer=null;
35	    },
36		onTouchStart:function(swiper){
37			holdPosition=0,clearTimeout(mySwiperNavTimer);
38		},
39		onTouchEnd:function(swiper){
40			if(holdPosition!=0){
41				$('#m_nav_mask_fun').hide();
42				mySwiperNavTimer=setTimeout(function(){$('#m_nav_mask_fun_left').stop().fadeIn();   },1000)
43			}else{
44				mySwiperNavTimer=setTimeout(function(){$('#m_nav_mask_fun').stop().fadeIn();   },1000)
45				$('#m_nav_mask_fun_left').hide();
46			}
47		},
48		onResistanceAfter: function(swiper,pos){
49		  holdPosition = pos
50	  }
51	})
52
53	function topNavFun(){
54		if($(window).scrollTop()>
55		   ($('.m_tou_date').height()+$('.m_top_logo').height()  )  
56		  ){
57		  	
58			if(!$('.swiper_container_top_nav').hasClass('fixed')){
59				$('.swiper_container_top_nav').addClass('fixed');
60		    }
61		}else if(
62			$(window).scrollTop()<=
63		   ($('.m_top_logo').height()  )  
64		){
65			
66			if($('.swiper_container_top_nav').hasClass('fixed')){
67				$('.swiper_container_top_nav').removeClass('fixed');
68		    }
69		}
70	}
71	// topNavFun();
72	$(window).scroll(function(){
73		topNavFun();
74	});
75
76}
77/*小屏顶部导航结束*/
78
79
80
81if($('.m_chnldesc_tab_btn_sy').size()>0){
82	$('.m_chnldesc_tab_btn_sy').children().click(function(e){
83		var _this = $(this);
84		_this.addClass('cur').siblings().removeClass('cur').parents('.show_part_parents').find('.show_part').eq(_this.index()).show().siblings('.show_part').hide();
85	});
86}
87
88
89
90
91if($(window).width()>992){
92	$('.show_part_parents').each(function(i,e){
93		var _index = 0,
94			_pc_tab = $(this).find('.pc_tab'),
95			_curStyleClass = _pc_tab.attr('data-curclass')
96		;
97		$(this).find('.show_part').each(function(i1,e1){
98			if($(this).is(':visible')){
99				_index = i1
100			}
101		});
102		_pc_tab.children().eq(_index).addClass(_curStyleClass).siblings().removeClass(_curStyleClass);
103
104	});
105}
106if($(window).width()<=992){
107
108	$('.show_part_parents').each(function(i,e){
109		var _index = 0,
110			_ms_tab = $(this).find('.m_chnldesc_tab_btn_sy')
111		;
112		$(this).find('.show_part').each(function(i1,e1){
113			if($(this).is(':visible')){
114				_index = i1
115			}
116		});
117		_ms_tab.children().eq(_index).addClass('cur').siblings().removeClass('cur');
118	});
119}
120$(window).resize(function(){
121	if($(window).width()>992){
122		$('.show_part_parents').each(function(i,e){
123			var _index = 0,
124				_pc_tab = $(this).find('.pc_tab'),
125				_curStyleClass = _pc_tab.attr('data-curclass')
126			;
127			$(this).find('.show_part').each(function(i1,e1){
128				if($(this).is(':visible')){
129					_index = i1
130				}
131			});
132			_pc_tab.children().eq(_index).addClass(_curStyleClass).siblings().removeClass(_curStyleClass);
133
134		});
135	}
136	if($(window).width()<=992){
137	
138		$('.show_part_parents').each(function(i,e){
139			var _index = 0,
140				_ms_tab = $(this).find('.m_chnldesc_tab_btn_sy')
141			;
142			$(this).find('.show_part').each(function(i1,e1){
143				if($(this).is(':visible')){
144					_index = i1
145				}
146			});
147			_ms_tab.children().eq(_index).addClass('cur').siblings().removeClass('cur');
148		});
149	}
150});
151
152
153
154if($('#returnTopFun').size()>0){
155	$(window).scroll(function(){
156		if($(window).width()+20<=1200){
157			if($(window).scrollTop()>=$(window).height()/2){
158				$('#returnTopFun').fadeIn('fast')		
159			}else{
160				$('#returnTopFun').fadeOut('fast')
161			}
162		}
163	});
164	$('#returnTopFun').click(function(){$('body,html').animate({'scrollTop':0}) });
165	$(window).resize(function(){
166		if($(window).width()+20>1200){
167			$('#returnTopFun').attr('style')!=undefined?$('#returnTopFun').attr('style',''):'';
168		}else{
169			if($(window).scrollTop()>=$(window).height()/2){
170				$('#returnTopFun').fadeIn('fast')		
171			}else{
172				$('#returnTopFun').fadeOut('fast')
173			}
174		}
175	});
176}
177
178
179if($('.gd_A_toggle_fun').size()>0){
180	$('.gd_A_toggle_fun').each(function(i,e){
181		var _this=$(this),_startindex=_this.attr('data-startindex'),_thisCount=parseInt(_this.attr('data-count'));
182		_this.click(function(){
183			$(this).toggleClass(function(){
184				if(_thisCount%2){
185					_this.html('收起');
186					_this.attr('data-count',_thisCount++)	
187				}else{
188					_this.html('更多');
189					_this.attr('data-count',_thisCount++)	
190				}
191				return 'sq'
192			}).parent().toggleClass('nonepadding').siblings().slice(_startindex).fadeToggle('fast');
193
194		}).click();
195	});
196}
197
198
199if($('.common_tab_btn').size()>0){
200	$('.common_tab_btn').each(function(i,e){
201		var _this = $(this);
202		_this.find('.btn').click(function(){
203			$(this).addClass('cur').siblings('.btn').removeClass('cur').end().parents('.common_tab_parents').find('.common_tab_show_part').eq($(this).index()).show().siblings('.common_tab_show_part').hide();
204		}).first().click();
205		
206//20181212
207//公开频道页点击“信息发布”、“政策解读”、“回应关切”、“公众参与”、“监督与建议渠道”不展示底部的列表moe_gkml_list m_moe_gkml_list
208//20190122
209//分页也要隐藏
210if($('.m_moe_gkml_list').size()>0){
211			_this.find('.btn').first().click(function(){
212				$('.m_moe_gkml_list').show();
213				$('.m_scy_tylb_fy').show();
214			});
215			_this.find('.btn').not(":first").click(function(){
216				$('.m_moe_gkml_list').hide();
217				$('.m_scy_tylb_fy').hide();
218			});
219		}
220	});
221}
222
223
224
225
226
227/*微言教育开始*/
228
229if($('#weibo_show').size()>0){
230
231	!function(){
232
233	var _iframeSrc_1='https://widget.weibo.com/weiboshow/index.php?language=&width=auto&height=300&fansRow=2&ptype=0&speed=0&skin=1&isTitle=0&noborder=0&isWeibo=1&isFans=0&uid=2737798435&verifier=5192ec39&colors=ffffff,ffffff,4b4b4b,567FE6,ffffff&dpc=1',
234		_iframeSrc_2='https://widget.weibo.com/weiboshow/index.php?language=&width=auto&height=570&fansRow=2&ptype=0&speed=0&skin=1&isTitle=0&noborder=0&isWeibo=1&isFans=0&uid=2737798435&verifier=5192ec39&colors=ffffff,ffffff,4b4b4b,567FE6,ffffff&dpc=1',
235		_iframeO=$('#weibo_show iframe')
236	;
237
238	if($(window).width()+20<=1200){
239		_iframeO.attr('src',_iframeSrc_2)	
240	}else{
241		_iframeO.attr('src',_iframeSrc_1)	
242
243	}
244
245	$(window).resize(function(){
246		if($(window).width()+20<=1200){
247			_iframeO.removeClass('iframeS');
248			if(!_iframeO.hasClass('iframeB')){
249				_iframeO.attr('src',_iframeSrc_2)	
250				_iframeO.addClass('iframeB')
251			}
252		}else{
253			_iframeO.removeClass('iframeB');
254			if(!_iframeO.hasClass('iframeS')){
255				_iframeO.attr('src',_iframeSrc_1)	
256				_iframeO.addClass('iframeS')
257			}
258		}
259	});
260	
261
262	}()	
263
264}
265
266/*微言教育结束*/

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.