var vinTechniqueDetails = function(){ var addListeners = function(){ //鎼滅储鍏抽敭璇 $('#search').on('click',function(){ toSearchUrl(); }); //鍥炶溅鎵ц鎼滅储 $('#technique-search').keyup(function(event){ if(event.keyCode == 13){ toSearchUrl(); } }); $('#refresh').on('click', function(){ initHobbyArticles(); }); $('.customercase_page .totop').on('click',function () { toTop(); }); } var toSearchUrl = function(){ var searchContent = $('#technique-search').val(); if(searchContent == "") { window.location.href = "/customer-stories/"; return; }; window.location.href = "/customer-stories/?search=" + searchContent; } //鍒濆鍖栨劅鍏磋叮鐨勬枃绔 var initHobbyArticles = function(){ var id = $("#refresh").attr("data-id"); var data = {id:id}; $.post('/api/', {m:4,f:'getOtherCaseList',p:data}, function(d){ var data = JSON.parse(d); var content = ""; for(var i=0;i
鏌ョ湅璇︽儏

'+data[i].name+'

'+data[i].type+'

'+data[i].abstract+'

'; } $('#refreshContent').html(content); }); } // 鍐呭涓虹┖闅愯棌div if($(".contentChallenge-text").next().length == 0) { $(".case-content1").hide(); } if($(".contentSolution-text").next().length == 0) { $(".case-content2").hide(); } if($(".contentJudge-text").next()[0].className == "row") { $(".case-content3").hide(); } let runTabMenu = function () { let windowTop = $(window).scrollTop(); if(windowTop > 300){ $(".totop").show(); }else{ $(".totop").hide(); } } return{ init: function(){ initHobbyArticles(); addListeners(); clicks(); jQuery(window).load(runTabMenu()); jQuery(window).scroll(runTabMenu); } }; }(); $(document).ready(function(){ vinTechniqueDetails.init(); });