PageSourceSearch

https://rohoon.com/js/custom.js

js rohoon.com collected 2026-10-09 22:57:25 UTC 19,222 bytes, 370 lines download raw bytes

1
2(function () {
3
4    "use strict";
5    var Core = {
6        initialized: false,
7        initialize: function () {
8
9            if (this.initialized)
10                return;
11            this.initialized = true;
12            this.build();
13        },
14        build: function () {
15            // Dropdown menu
16            this.cotentslide();
17            this.headnav();
18            this.footerContent();
19            // Owl carousel init
20            this.initOwlCarousel();
21            // Stick slider init
22            this.initStickSlider();
23            // Fixed header
24            this.fixedHeader();
25            // Progress bar animation
26            this.progressBarAnimation();
27            // Wow init
28            this.wowInit();
29            // Loader
30            this.loaderInit();
31            // Start video
32            this.startVideo();
33            // Toggle search
34            this.toggleSearch();
35            // Top slider init
36            this.initSliderPro();
37            // Init fancybox
38           this.initFancyBox();
39            // Init fancybox video
40            this.initFancyBoxVideo();
41
42        },
43
44        headnav: function () {
45            var htmlString = "";
46            htmlString += '<div class="container relative-nav-container">';
47            htmlString += '<a class="toggle-button visible-xs-block" data-toggle="collapse" data-target="#navbar-collapse">';
48            htmlString += '<i class="fa fa-navicon"></i></a>';
49            htmlString += '<a class="navbar-brand scroll" href="index.html">';
50            htmlString += '<img class="normal-logo hidden-xs" src="img/logo.svg" alt="logo" />';
51            htmlString += '<img class="scroll-logo hidden-xs" src="img/logo.svg" alt="logo" />';
52            htmlString += '<img class="scroll-logo visible-xs-block" src="img/logo1.svg" alt="logo" /></a>';
53
54            htmlString += '<div class="navbar-collapse collapse floated" id="navbar-collapse">';
55            htmlString += '<ul class="nav navbar-nav navbar-with-inside clearfix navbar-right with-border"> ';
56            htmlString += ' <li><a href="about.html">公司简介</a></li>';
57            htmlString += ' <li><a href="iqmp.html">iQMP</a></li>';
58			      htmlString += ' <li><a href="products.html">质量运行时系统</a></li>';
59            htmlString += ' <li><a href="business.html#business">核心业务</a></li>';
60            htmlString += ' <li><a href="business.html">核心产品</a></li>';
61           // htmlString += ' <li><a href="employ.html">广聘英才</a></li>';
62            htmlString += ' <li><a href="contact.html">联系我们</a></li></ul></div></div>';
63            htmlString += ' ';
64            $("#nav").html(htmlString);
65			
66			var html = "";
67			 html += '<div class="container relative-nav-container">';
68            html += '<a class="toggle-button visible-xs-block" data-toggle="collapse" data-target="#navbar-collapse">';
69            html += '<i class="fa fa-navicon"></i></a>';
70            html += '<a class="navbar-brand scroll" href="index.html">';
71            html += '<img class="normal-logo hidden-xs" src="../img/logo.svg" alt="logo" />';
72            html += '<img class="scroll-logo hidden-xs" src="../img/logo.svg" alt="logo" />';
73            html += '<img class="scroll-logo visible-xs-block" src="img/logo1.svg" alt="logo" /></a>';
74
75            html += '<div class="navbar-collapse collapse floated" id="navbar-collapse">';
76            html += '<ul class="nav navbar-nav navbar-with-inside clearfix navbar-right with-border"> ';
77            html += ' <li><a href="about.html">Company Profile</a></li>';
78            html += ' <li><a href="business.html#business">Core Business</a></li>';
79            html += ' <li><a href="business.html">Core Products</a></li>';
80            html += ' <li><a href="employ.html">Recruiting Talents</a></li>';
81            html += ' <li><a href="contact.html">Contact us</a></li></ul></div></div>';
82            html += ' ';
83            $("#naven").html(html);
84        },
85
86        footerContent: function () {
87            var footer = "";
88            footer += ' <section class="footer-section"><div class="container"><div class="row"><div class="col-md-3 col-sm-3">';
89            footer += ' <h5>
89关于我们</h5><div class="row"><div class="col-md-6">';
90            footer += ' <ul class="footer-nav"><li><a href="about.html">公司简介</a></li><li><a href="business.html#business">核心业务</a></li> ';
91            footer += ' <li ><a href="employ.html">广聘英才</a></li><li ><a href="FAQ.html">常见问题</a></li><li><a href="contact.html">联系我们</a></li></ul></div></div></div>';
92
93            footer += ' <div class="col-md-3 col-sm-3"><h5>核心产品</h5><div class="row"><div class="col-md-12">';
94            footer += ' <ul class="footer-nav"><li><a href="business.html">IMCS</a></li> ';
95            footer += ' <li><a href="iqmp.html">iQMP</a></li><li><a href="products.html">质量运行时系统</a></li><li ><a href="business.html">测量数字化产品</a></li><li><a href="business.html#tab4">在线SPC</a></li><li><a href="business.html">远程专家系统</a></li></ul></div> ';
96            footer += '  </div></div>';
97            footer += '  <div class="col-md-4 col-sm-4"><h5>联系我们</h5><ul class="contacts-list"><li>';
98            footer += '  <p><i class="icon icon-House"></i>上海市浦东新区福山路458号同盛大厦13楼B-D座、I座</p></li><li> ';
99            footer += '   <p><i class="icon icon-Phone2"></i>+86 021-50588095</p></li><li><p><i class="icon icon-Mail"></i>';
100            footer += '  <a href="mailto:[email protected]">[email protected]</a></p></li><li> ';
101            footer += '   <p><i class="icon icon-Time"></i>周一至周五(9:00-18:00)</p></li></ul></div> ';
102            footer += '   <div class="col-md-2 col-sm-2"></div> </div></div></section>';
103            footer += '  <section class="copyright-section" ><p style="font-size: 12px"><a href="http://beian.miit.gov.cn" target="_blank" style="color: #999999" >沪ICP备2021002733号</a></p><p >Copyright &copy; 2024.Rohoon All rights reserved. </p></section>';
104            $("#footerContent").html(footer);
105			
106			  var footeren = "";
107            footeren += ' <section class="footer-section"><div class="container"><div class="row"><div class="col-md-3 col-sm-3">';
108            footeren += ' <h5>About Us</h5><div class="row"><div class="col-md-6">';
109            footeren += ' <ul class="footer-nav"><li><a href="about.html">Company Profile</a></li><li><a href="business.html#business">Core Business</a></li> ';
110            footeren += ' <li ><a href="employ.html">Recruiting Talents</a></li><li ><a href="FAQ.html">FAQ</a></li><li><a href="contact.html">Contact Us</a></li></ul></div></div></div>';
111
112            footeren += ' <div class="col-md-3 col-sm-3"><h5>Core Products</h5><div class="row"><div class="col-md-9">';
113            footeren += ' <ul class="footer-nav"><li><a href="business.html">IMCS</a></li><li><a href="products.html">IPENSEE</a></li> ';
114            footeren += ' <li ><a href="business.html">Measuring Digital Products</a></li><li><a href="business.html#tab4">SPC Online</a></li><li><a href="business.html">Remote Expert System</a></li></ul></div> ';
115            footeren += '  </div></div>';
116            footeren += '  <div class="col-md-4 col-sm-4"><h5>Contact Us</h5><ul class="contacts-list"><li>';
117            footeren += '  <p><i class="icon icon-House"></i>Room 1105,Lane 1900,Jintao Building,Shangcheng Road,Pudong New Area,Shanghai</p></li><li> ';
118            footeren += '   <p><i class="icon icon-Phone2"></i>+86 021-50588095</p></li><li><p><i class="icon icon-Mail"></i>';
119            footeren += '  <a href="mailto:[email protected]">[email protected]</a></p></li><li> ';
120            footeren += '   <p><i class="icon icon-Time"></i>Monday to Friday(9:00-18:00)UTC+8</p></li></ul></div> ';
121            footeren += '   <div class="col-md-2 col-sm-2"></div> </div></div></section>';
122            footeren += '  <section class="copyright-section"><p>Copyright &copy; 2022.Rohoon All rights reserved. <a href="http://beian.miit.gov.cn" target="_blank">沪ICP备2021002733号-1</a> <a href="http://beian.miit.gov.cn" target="_blank">沪ICP备2021002733号-2</a></p></section>';
123            $("#footerContenten").html(footeren);
124			
125        },
126
127
128        initFancyBox: function () {
129            $('.fancybox').fancybox();
130        },
131        initFancyBoxVideo: function () {
132            $(".fancybox-video").click(function () {
133                $.fancybox({
134                    'padding': 0,
135                    'autoScale': false,
136                    'transitionIn': 'none',
137                    'transitionOut': 'none',
138                    'title': this.title,
139                    'width': 680,
140                    'height': 495,
141                    'href': this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
142                    'type': 'swf',
143                    'swf': {
144                        'wmode': 'transparent',
145                        'allowfullscreen': 'true'
146                    }
147                });
148
149                return false;
150            });
151        },
152        cotentslide: function (options) {
153
154            var scrollPane = $(".scroll-pane"),
155                scrollContent = $(".scroll-content");
156            //build slider
157            var scrollbar = $(".scroll-bar").slider({
158                slide: function (event, ui) {
159                    if (scrollContent.width() > scrollPane.width()) {
160                        scrollContent.css("margin-left", Math.round(
161                            ui.value / 100 * (scrollPane.width() - scrollC
161ontent.width())
162                        ) + "px");
163                    } else {
164                        scrollContent.css("margin-left", 0);
165                    }
166                }
167            });
168            //append icon to handle
169            var handleHelper = scrollbar.find(".ui-slider-handle")
170                .mousedown(function () {
171                    scrollbar.width(handleHelper.width());
172                })
173                .mouseup(function () {
174                    scrollbar.width("100%");
175                })
176                .append("<span class='ui-icon ui-icon-grip-dotted-vertical'></span>")
177                .wrap("<div class='ui-handle-helper-parent'></div>").parent();
178            //change overflow to hidden now that slider handles the scrolling
179            scrollPane.css("overflow", "hidden");
180
181            //size scrollbar and handle proportionally to scroll distance
182            function sizeScrollbar() {
183                var remainder = scrollContent.width() - scrollPane.width();
184                var proportion = remainder / scrollContent.width();
185                var handleSize = scrollPane.width() - (proportion * scrollPane.width());
186                scrollbar.find(".ui-slider-handle").css({
187                    width: handleSize,
188                    "margin-left": -handleSize / 2
189                });
190                handleHelper.width("").width(scrollbar.width() - handleSize);
191            }
192
193            //change handle position on window resize
194            $(window).resize(function () {
195                sizeScrollbar();
196            });
197            //init scrollbar size
198            setTimeout(sizeScrollbar, 10); //safari wants a timeout
199
200        },
201        initStickSlider: function (options) {
202            $(".enable-stick-slider").each(function (i) {
203                var $stick = $(this);
204                $stick.slick({
205                    responsive: [
206                        {
207                            breakpoint: 500,
208                            settings: {
209                                slidesToShow: 1,
210                                slidesToScroll: 1
211                            }
212                        }
213                    ]
214                });
215            });
216
217        },
218        initOwlCarousel: function (options) {
219
220            $(".enable-owl-carousel").each(function (i) {
221                var $owl = $(this);
222                var navigationData = $owl.data('navigation');
223                var paginationData = $owl.data('pagination');
224                var singleItemData = $owl.data('single-item');
225                var autoPlayData = $owl.data('auto-play');
226                var transitionStyleData = $owl.data('transition-style');
227                var mainSliderData = $owl.data('main-text-animation');
228                var afterInitDelay = $owl.data('after-init-delay');
229                var stopOnHoverData = $owl.data('stop-on-hover');
230                var min600 = $owl.data('min600');
231                var min800 = $owl.data('min800');
232                var min1200 = $owl.data('min1200');
233                $owl.owlCarousel({
234                    navigation: navigationData,
235                    pagination: paginationData,
236                    singleItem: singleItemData,
237                    autoPlay: autoPlayData,
238                    transitionStyle: transitionStyleData,
239                    stopOnHover: stopOnHoverData,
240                    navigationText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"],
241                    itemsCustom: [
242                        [0, 1],
243                        [600, min600],
244                        [800, min800],
245                        [1200, min1200]
246                    ],
247                    afterInit: function (elem) {
248                        if (mainSliderData) {
249                            setTimeout(function () {
250                                $('.main-slider_zoomIn').css('visibility', 'visible').removeClass('zoomIn').addClass('zoomIn');
251                                $('.main-slider_fadeInLeft').css('visibility', 'visible').removeClass('fadeInLeft').addClass('fadeInLeft');
252                                $('.main-slider_fadeInLeftBig').css('visibility', 'visible').removeClass('fadeInLeftBig').addClass('fadeInLeftBig');
253                                $('.main-slider_fadeInRightBig').css('visibility', 'visible').removeClass('fadeInRightBig').addClass('fadeInRightBig');
254                            }, afterInitDelay);
255                        }
256                    },
257                    beforeMove: function (elem) {
258                        if (mainSliderData) {
259                            $('.main-slider_zoomIn').css('visibility', 'hidden').removeClass('zoomIn');
260                            $('.main-slider_slideInUp').css('visibility', 'hidden').removeClass('slideInUp');
261                            $('.main-slider_fadeInLeft').css('visibility', 'hidden').removeClass('fadeInLeft');
262                            $('.main-slider_fadeInRight').css('visibility', 'hidden').removeClass('fadeInRight');
263                            $('.main-slider_fadeInLeftBig').css('visibility', 'hidden').removeClass('fadeInLeftBig');
264                            $('.main-slider_fadeInRightBig').css('visibility', 'hidden').removeClass('fadeInRightBig');
265                        }
266                    },
267                    afterMove: sliderContentAnimate,
268                    afterUpdate: sliderContentAnimate,
269                });
270            });
271
272            function sliderContentAnimate(elem) {
273                var $elem = elem;
274                var afterMoveDelay = $elem.data('after-move-delay');
275                var mainSliderData = $elem.data('main-text-animation');
276                if (mainSliderData) {
277                    setTimeout(function () {
278                        $('.main-slider_zoomIn').css('visibility', 'visible').addClass('zoomIn');
279                        $('.main-slider_slideInUp').css('visibility', 'visible').addClass('slideInUp');
280                        $('.main-slider_fadeInLeft').css('visibility', 'visible').addClass('fadeInLeft');
281                        $('.main-slider_fadeInRight').css('visibility', 'visible').addClass('fadeInRight');
282                        $('.main-slider_fadeInLeftBig').css('visibility', 'visible').addClass('fadeInLeftBig');
283                        $('.main-slider_fadeInRightBig').css('visibility', 'visible').addClass('fadeInRightBig');
284                    }, afterMoveDelay);
285                }
286            }
287        },
288        fixedHeader: function (options) {
289            if ($(window).width() > 767) {
290                // Fixed Header
291                var topOffset = $(window).scrollTop();
292                if (topOffset > 0) {
293                    $('body').addClass('fixed-header');
294                }
295                $(window).on('scroll', function () {
296                    var fromTop = $(this).scrollTop();
297                    if (fromTop > 0) {
298                        $('body').addClass('fixed-header');
299                    } else {
300                        $('body').removeClass('fixed-header');
301                    }
302
303                });
304            }
305        },
306        progressBarAnimation: function (options) {
307            $('.skills').waypoint(function () {
308                $('.skills-animated').each(function () {
309                    var persent = $(this).attr('data-percent');
310                    $(this).find('.progress').animate({
311                        width: persent + '%'
312                    }, 300);
313                });
314            }, {
315                offset: '100%',
316                triggerOnce: true
317            });
318        },
319        wowInit: function () {
320            var scrollingAnimations = $('body').data("scrolling-animations");
321            if (scrollingAnimations) {
322                new WOW().init();
323            }
324        },
325        loaderInit: function () {
326            $(window).on('load', function () {
327                var $preloader = $('#page-preloader'),
328                    $spinner = $preloader.find('.spinner');
329                $spinner.fadeOut();
330                $preloader.delay(350).fadeOut(800);
331            });
332        },
333        startVideo: function () {
334            if (!Modernizr.touch) {
335                $(".video-play").mb_YTPlayer();
336            }
337        },
338        toggleSearch: function () {
339            $(document).on('click', "#search-open, #search-close", function () {
340                $('.header').toggleClass('search-open');
341            });
342        },
343        initSliderPro: function () {
344            if ($('#topSlider').length > 0) {
345
346                $('#topSlider').sliderPro({
347                    width: 1600,
348                    height: 800,
349                    fade: true,
350                    arrows: true,
351                    buttons: false,
352                    waitForLayers: true,
353                    thumbnailPointer: false,
354                    touchSwipe: false,
355                    autoplay: false,
356                    autoScaleLayers: false,
357                    captionFadeDuration: 100
358
359                });
360
361            }
362        }
363    };
364    Core.initialize();
365//Pretty Photo
366	$("a[rel^='prettyPhoto']").prettyPhoto({
367		social_tools: false
368	});	
369
370})();

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.