| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <script src="/main/dist/website/template/BNr02DHL36iU/plug-in/swiper@5.3.7/js/swiper.min.js"></script>
- <script src="/main/dist/website/template/BNr02DHL36iU/plug-in/js/jquery1.11.3.min.js"></script>
- <script src="/js/website.visit.js?v=20261111-visit-beacon" ></script>
- <script>
- // 轮播
- var swiper = new Swiper('.swiper-container', {
- spaceBetween: 30,
- effect: 'fade',
- loop: true,
- autoplay:true, //自动切换
- pagination: {
- el: '.swiper-pagination',
- clickable: true,
- },
- navigation: {
- nextEl: '.swiper-button-next',
- prevEl: '.swiper-button-prev',
- },
- });
- // 滚动跳转导航高度
- $(window).scroll(function() {
- if($(window).scrollTop() >= 30){
- $('.nav').css({
- "height": "50px",
- "line-height": "50px"
- });
- $(".nav-placeholder").css("height","50px");
- $(".nav-list").css("top","50px");
- }else{
- $('.nav').css({
- "height": "80px",
- "line-height": "80px"
- });
- $(".nav-placeholder").css("height","80px");
- $(".nav-list").css("top","80px");
- }
- });
- window.onload = function () {
- var imgHeight = $(".swiper-container").height();
- $(".banner").height(imgHeight);
- // 搜索
- $(".search-icon").click(function(){
- $(".search-wrap").slideDown(100);
- $(".search-wrap input").focus();
- })
- // 关闭搜索
- $(".search-close").click(function(){
- $(".search-wrap").slideUp(100);
- })
- // 搜索输入
- $(".search-wrap input").bind("input",function(){
- if($(this).val().length != 0){
- $(".search-wrap button").show();
- $(".search-wrap .search-close").hide();
- }else{
- $(".search-wrap button").hide();
- $(".search-wrap .search-close").show();
- }
-
- })
- // 移动端导航
- $(".nav-icon").click(function(){
- if($(".nav-list").css("display") == "none"){
- $(".nav-list").slideDown(200);
- }else{
- $(".nav-list").slideUp(200);
- }
- })
-
- }
- window.onresize = function () {
- var imgHeight = $(".swiper-container").height();
- $(".banner").height(imgHeight);
- }
- </script>
|