PageSourceSearch

https://www.diana.co.jp/cn/wp-content/themes/diana/common/js/common2.js

js diana.co.jp collected 2026-10-01 13:05:45 UTC 6,509 bytes, 291 lines download raw bytes

1// JavaScript Document
2  var windowsize;
3    var $window = $(window);
4    function checkWidth() {
5         windowsize = $window.width();
6    }
7$(window).resize(checkWidth());
8$( window ).resize(function() {
9    /*if(windowsize<1000)
10  $("header").css("height", "62px");*/
11});
12  $(function () {
13 
14        $('.up-arrow').click(function () {
15            $(this).blur();
16
17            $('html,body').animate({ scrollTop: 0 }, 'fast');
18
19            return false;
20        });
21       
22       $('.spmenu').click(function () {
23        $('html, body').animate({ scrollTop: 0 }, 0);
24         if( !$("header").hasClass("header_open"))
25         {
26         $("header").addClass("header_open");
27          //$("header").addClass("header_wh");
28         
29         // $(".header_open .gNavWrap").css("height", $( window ).height());
30          
31         }
32         else
33         {
34          $("header").removeClass("header_open"); 
35            if($(window).scrollTop() < 100)
36            {
37            //$("header").removeClass("header_wh");  
38            } 
39         }
40          
41        });
42        $('.spclose').click(function () {
43         if( !$("header").hasClass("header_open"))
44         {
45         $("header").addClass("header_open");
46          //$("header").addClass("header_wh");
47         }
48         else
49         {
50          $("header").removeClass("header_open");  
51          if($(window).scrollTop() < 100)
52            {
53            //$("header").removeClass("header_wh");  
54            } 
55         }
56        });
57});
58
59$(window).on("scroll", function() {
60    if($(window).scrollTop() > 30) {
61      //$("header").addClass("header_up");
62      $('.hewrap').css('display','none');
63       $('.breadcumb').css('top','48px');
64      
65      $('#topscroll').addClass("topon");
66
67
68
69
70
71
72
73    } else {
74       
75
76            // $("header").removeClass("header_up");
77             $('.hewrap ').css('display','block');
78              $('#topscroll').removeClass("topon");
79                $('.breadcumb').css('top','70px');
80    }
81});
82
83$(document).ready(function() {
84
85$("a[href='#anchortop']").click(function() {
86  $("html, body").animate({ scrollTop: 0 }, "slow");
87  return false;
88});
89
90    $('.responsive').slick({
91        // dots: true,
92
93        infinite: true,
94        speed: 2000,
95        autoplaySpeed: 4000,
96        slidesToShow: 1,
97        slidesToScroll: 1,
98        autoplay: true,
99        dots: true,
100        responsive: [{
101            breakpoint: 1024,
102            settings: {
103                slidesToShow: 1,
104                slidesToScroll: 1,
105               
106
107            }
108
109        }, {
110            breakpoint: 1000,
111            settings: {
112                slidesToShow: 1,
113                slidesToScroll: 1,
114                dots: true,
115                infinite: true,
116
117            }
118
119
120        }, {
121            breakpoint: 600,
122            settings: {
123                slidesToShow: 1,
124                slidesToScroll: 1,
125                dots: true,
126                infinite: true,
127                
128            }
129        }, {
130            breakpoint: 1000,
131            settings: {
132                slidesToShow: 1,
133                slidesToScroll: 1,
134                dots: true,
135                infinite: true,
136                autoplay: true,
137                autoplaySpeed: 2000,
138            }
139        }]
140    });
141});
142
143
144$(function(){
145   $(".submenu_on").click(function(){
146
147   if(!$(this).hasClass("subnavactive"))
148         {
149       
150         $(this).find(".next_nav").show(); 
151          $(this).addClass("subnavactive");
152
153          
154         }
155         else
156         {
157           $(this).find(".next_nav").hide(); 
158          $(this).removeClass("subnavactive");       
159
160        
161         }
162  })
163
164var showChar = 30;
165  var ellipsestext = "...";
166  
167  $('.h3-tit').each(function() {
168    var content = $(this).html();
169    if (content.length > showChar) {
170      var c = content.substr(0, showChar);
171      var h = content.substr(showChar - 1, content.length - showChar);
172      var html = c + '<span class="moreelipses">' + ellipsestext + '</span>';
173      $(this).html(html);
174    }
175  });
176
177})
178var _scrTop2;
179 $(function(){   
180            
181           $(window).scroll(function(){
182                var _scrTop = $(window).scrollTop();
183                 $(window).resize(checkWidth);
184                _scrTop2=$(window).scrollTop();
185                if(_scrTop == 0){
186                    if ( !$("header").hasClass("headerhoveractive")) 
187                if( $("body").hasClass("home"))
188                 $("#topscroll").stop(true, true).slideUp();
189                   
190                checkWidth();
191                if( windowsize>1000){
192                    $("header").css("height","68px");
193                     $("header").removeClass("headeract");
194               }
195                 else
196                 {
197                  $("header").css("height","79px");
198                 }
199
200               
201                 
202                }
203                else
204                {
205                  
206                   $("#topscroll").stop(true, true).slideDown();
207                     checkWidth();
208                if( windowsize>1000){
209                   $("header").css("height","68px");
210                    $("header").addClass("headeract");
211               }
212                 else
213                 {
214                  $("header").css("height","79px");
215                 }
216
217                }   
218              
219   });            
220 });
221
222    // Execute on load
223    checkWidth();
224    // Bind event listener
225    $(window).resize(checkWidth);
226
227    $(function(){ 
228       
229
230window.onload=function(){
231$(".secfad").addClass("zoom");
232  //$(".intro").fadeIn(5000);;
233    setTimeout(function(){
234    $(".secfad").removeClass("zoom");
235    },2000);
236    
237
238}
239
240  $(function () {
241 
242        $('#pp-nav a').click(function () {
243           //$(".intro").fadeIn(5000);
244            $(".secfad").addClass("zoom");
245
246    setTimeout(function(){
247    $(".secfad").removeClass("zoom");
248    },2000);
249        });
250       
251       
252});
253
254
255
256
257
258
259
260});
261$(window).on('resize', function()
262{
263  if (/iphone|ipod|android|blackberry|opera mini|opera mobi|skyfire|maemo|windows phone|palm|iemobile|symbian|symbianos|fennec/i.test(navigator.userAgent.toLowerCase())) {
264  }
265else
266   { 
267     $("header").removeClass("header_open");  
268      $("header").css("height","79px");
269    }
270});
271$(function(){
272
273
274  $(".menu_scrollup").mouseenter(function(){
275    $("#topscroll").slideUp();
276
277
278  });
279
280 
281
282   
283});
284
285$(function(){
286  $( window ).resize(function() {
287    if(windowsize>1000){
288       $(".next_nav.sp").hide();
289    }
290});
291});

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.