123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- $(function(){
- var mySwiper = new Swiper('.js_officeLise_list', {
- autoplay: false,//可选选项,自动滑动
- slidesPerView : 1,
- slidesPerGroup : 1,
- pagination : '.swiper-pagination',
- paginationClickable :true,
- noSwiping : true,
- autoHeight: true, //高度随内容变化
- paginationBulletRender: function (swiper, index, className) {
- return '<span class="' + className + '">' + (index + 1) + '</span>';
- }
- })
- setTimeout(function(){
- var mySwiperadv = new Swiper(".js_officeHot_list",{
- loop : true,
- autoplay: 8000,//可选选项,自动滑动
- slidesPerView : 'auto',
- slidesPerGroup : 1,
- pagination : '.officeHot_list_main .swiper-pagination',
- paginationClickable :true,
- onSetTranslate: function(swiper,translate){
- //自定义事件
- if(swiper.translate < 0 && swiper.realIndex > 0) {
- var TR=swiper.translate
- $(".js_officeHot_list ul").css({
- 'transform': 'translate3d('+(TR+25)+'px, 0px, 0px)'
- })
- }
- },
- });
- },2000)
- var _i=0;
- var _length=$('.js_show_list ul li').length;
- var _text='';
- var _ico='';
- var _name='';
- $('.js_show_list ul li').on('mouseover',function(){
- _text=$(this).find('.l_img').attr('data-text');
- _ico=$(this).find('.l_img img').attr('src');
- _name=$(this).find('.name').html();
- _i=$(this).index();
- $(this).addClass('on').siblings().removeClass('on');
- _Ihtml(_ico,_text,_name);
- })
- var interval;
- function myimg() {
- //通过i改变图片的名称从而实现图片自动切换
- if (_i < 4) {
- _i++;
- } else {
- _i = 0; //当i超出是重新赋值使其实现循环切换图片
- }
- //通过id获取图片并给它的src属性重新赋值
- _text=$('.js_show_list ul li').eq(_i).find('.l_img').attr('data-text');
- _ico=$('.js_show_list ul li').eq(_i).find('.l_img img').attr('src');
- _name=$('.js_show_list ul li').eq(_i).find('.name').html();
- $('.js_show_list ul li').eq(_i).addClass('on').siblings().removeClass('on');
- _Ihtml(_ico,_text,_name);
- }
- //启动定时器,给它一定的时间(毫秒)
- interval=setInterval(myimg,5000);
- $('.officeTeam_center').on({
- mouseover: function() {
- clearTimeout(interval); //关闭定时器
- },
- mouseleave: function() {
- interval = setInterval(myimg, "5000"); //启动定时器
- }
- });
- function _Ihtml(img,text,name){
- $('.officeTeam_center_show').html('');
- var _list=''
- _list+='<div class="show-main">';
- _list+='<div class="left_ico">';
- _list+='<img src="'+img+'" alt="">';
- _list+='</div>';
- _list+='<div class="right_text">';
- _list+='<p class="name">'+name+'</p>';
- _list+='<p class="text_m">'+text+'</p>';
- _list+='<a onclick="$53click()" href="javascript:;">立即咨询</a>';
- _list+='</div>';
- _list+='</div>';
- $('.officeTeam_center_show').html(_list);
- }
- $('.js_buttomBm').on('click',function(){
- var _hid=$(this).attr('data-hid')
- $('.applekf').show(20);
- $('.applekfBG').show();
- $('.applekf_form input[name="hid"]').val(_hid);
- })
- $('.applekfBG,.applekf_gb').on('click',function(){
- _clickHide();
- })
- function _clickHide(){
- $('.applekf').hide();
- $('.applekfBG').hide();
- }
- //调用方法二(传对象函数)
- var fun = {
- "error" : function(){
- PublicAction.hint("提交末成功!"); //编写需要操作的方法
- },
- "success" : function(){
- PublicAction.hint("提交成功!"); //编写需要操作的方法
- $('body input[type="text"]').val('');
- _clickHide();
- }
- }
- PublicAction.AjaxSend({CORID:'js_submitBox'},fun);
-
- })
|