function removeHtmlTag(value) { return value.replace(/<[^>]*>/g, ''); }; function len(num, value){ if(value.length > num) { return value.substr(0, num) + '...'; } }; function scrollToView (id) { console.log('id: ' + id); document.getElementById(id).scrollIntoView({ block: 'start', inline: 'nearest', behavior: 'smooth' }) } function noticeUp(obj,top,time) { $(obj).animate({ marginTop: top }, time, function () { $(this).css({marginTop:"0"}).find(":first").appendTo(this); }) } $(document).ready(function() { $('.dropdown').hover(function(){ $(this).find('.dropdown-toggle').dropdown('show') }, function(){ $(this).find('.dropdown-toggle').dropdown('hide') }); // 鍏ㄩ〉闈㈤摼鎺 $("#catelink .fixed-func-item-a").each(function (e){ if(!$(this).children('img').attr('src')){ $(this).parent().remove() }else{ let sourceName = $(this).data('name') let name = sourceName.match(/\(([^)]*)\)/)[1] $(this).find('span').html(name) } }) $("#back-top").hide(); //褰撴粴鍔ㄦ潯鐨勪綅缃浜庤窛椤堕儴100鍍忕礌浠ヤ笅鏃讹紝璺宠浆閾炬帴鍑虹幇锛屽惁鍒欐秷澶 $(function() { $(window).scroll(function() { if ($(window).scrollTop() > 100) { $("#back-top").fadeIn(1000); $("#back-top a").fadeIn(1500); } else { $("#back-top").hide(); $("#back-top a").fadeOut(1500); } }); //褰撶偣鍑昏烦杞摼鎺ュ悗锛屽洖鍒伴〉闈㈤《閮ㄤ綅缃 $("#back-top").click(function() { $('body,html').animate({ scrollTop: 0 }, 500); return false; }); }); }); /*搴曢儴婊氬姩鍜岀獊鍑烘樉绀烘爮鐩?/