$(function(){ //动画 wow = new WOW({ boxClass: 'wow', animateClass: 'animated', offset: 0, mobile: false, live: true }) wow.init(); }); ;(function($,window,document){"use strict";var defaults={deVal:0,className:'dataNums',digit:''};function rollNum(obj,options){this.obj=obj;this.options=$.extend(defaults,options);this.init=function(){this.initHtml(obj,defaults);}} rollNum.prototype={initHtml:function(obj,options){var strHtml='
';obj.html(strHtml);} this.scroNum(obj,options);},scroNum:function(obj,options){var number=options.deVal;var $num_item=$(obj).find('.'+options.className).find('.tt');var h=$(obj).find('.dataBoc').height();$num_item.css('transition','all 2s ease-in-out');var numberStr=number.toString();if(numberStr.length<=$num_item.length-1){var tempStr='';for(var a=0;a<$num_item.length-numberStr.length;a++){tempStr+='0';} numberStr=tempStr+numberStr;} var numberArr=numberStr.split('');$num_item.each(function(i,item){setTimeout(function(){$num_item.eq(i).css('top',-parseInt(numberArr[i])*h-h*10+'px');},i*100)});}} $.fn.rollNum=function(options){var $that=this;var rollNumObj=new rollNum($that,options);rollNumObj.init();};})(jQuery,window,document); // $("#obtn .souButn").click(function(){ $("#obtn .addSlide").hide(500); }); $("#obtn .TopSearch").click(function(){ $("#obtn .addSlide").show(500); }); var $i; var $flag = false; $(".sub").hover(function () { $flag = true; }, function () { $(".sub[data-m='" + $i + "']").slideUp(); $(".menu1 .l1 a[data-n='" + $i + "']").parent().parent().removeClass("active"); $flag = false; }); $(".menu1 .l1 span a").hoverIntent(function () { $i = $(this).attr("data-n"); $(".sub[data-m='" + $i + "']").slideDown(); $(this).parent().parent().addClass("active"); }, function () { if (!$flag) { $(".sub[data-m='" + $i + "']").slideUp(); $(this).parent().parent().removeClass("active"); } });