X
X
您的当前位置: 主页 > 山东 >
可爱女儿当哑铃 美国爸爸健身无处不在
window._bd_share_config = { common : { bdText : '可爱女儿当哑铃 美国爸爸健身无处不在', bdDesc : '可爱女儿当哑铃 美国爸爸健身无处不在' }, share : [{ "bdSize" : 16 }] } with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?cdnversion='+~(-new Date()/36e5)];
 

2016-06-24   来源 : baidu.com 查看原图 键盘← →翻页、Ctrl+← →翻相册、Shift+← →滑动
$(function(){ fix_img(); function fix_img(){ if($('.img_area img.show').width() < 1){ setTimeout(function(){ fix_img(); }, 500); return; } if($('.img_area img.show').width() > 940){ $('.img_area img.show').width(940); } fix_big_btn(); } function fix_big_btn(){ $('.click_to_prev, .click_to_next').css({ height: $('.img_area').height() }) } //调整滑动条到真实宽度 $('.slide_move_bar').width(28*116); //左右滑动 $('.slide_left').on('mouseenter', function(){ $(this).css({ backgroundPosition: '0 -77px' }); }); $('.slide_left').on('mouseleave', function(){ $(this).css({ backgroundPosition: '0 0' }); }); $('.slide_right').on('mouseenter', function(){ $(this).css({ backgroundPosition: '-20px -77px' }); }); $('.slide_right').on('mouseleave', function(){ $(this).css({ backgroundPosition: '-20px 0' }); }); $('.slide_left').on('click', function(){ var _left = $('.slide_move_bar').position().left; //左侧越界修正 if(_left >= 0){ $('.slide_move_bar').css({ left: 0 }); return; } $('.slide_move_bar').filter(':not(":animated")').animate({ left: _left+116 }, 200); }); $('.slide_right').on('click', function(){ var _left = $('.slide_move_bar').position().left; //数量过少不做滚动 if(28 <= 5){ return; } //右侧越界修正 if(_left <= -(28*116-5*116)){ $('.slide_move_bar').css({ left: -(28*116-5*116) }); return; } $('.slide_move_bar').filter(':not(":animated")').animate({ left: _left-116 }, 200); }); //点击换图 $('.img_temp_s_block_img_border').on('click', function(){ var _this = $(this); var _idx = _this.parent().index(); var _idx_now = $('.img_s_title span').text(); _idx_now = _idx_now - 1; //判断点击位置 if(_idx == _idx_now){ $('.img_area img:eq('+_idx+')').stop(); $('.img_area img:eq('+_idx+')').animate({ opacity: 1 }, 0); $('.last_gg').hide(); $('.img_area').css({ height: 'auto' }); return false; }else{ if(_idx > _idx_now){ //左滑出 右滑入 $('.img_area img.show').stop(); $('.img_area img.show').animate({ opacity: 0 }, 0, function(){ $('.img_area img.show').stop(); $('.img_area img.show').animate({ opacity: 1 }, 0); }); }else{ //右滑出 左滑入 $('.img_area img.show').stop(); $('.img_area img.show').animate({ opacity: 0 }, 0, function(){ $('.img_area img.show').stop(); $('.img_area img.show').animate({ opacity: 1 }, 0); }); } } $('.last_gg').hide(); $('.img_area').css({ height: 'auto' }); $('.img_temp_s_block_img_border.now').removeClass('now'); $('.img_area img.show').removeClass('show'); $('.img_area img:eq(' + _idx + ')').addClass('show'); if(_idx > _idx_now){ $('.img_area img:eq(' + _idx + ')').animate({ opacity: 0 }, 0, function(){ $('.img_area img:eq(' + _idx + ')').animate({ opacity: 1 }, 0); }); }else{ $('.img_area img:eq(' + _idx + ')').animate({ opacity: 0 }, 0, function(){ $('.img_area img:eq(' + _idx + ')').animate({ opacity: 1 }, 0); }); } $('.img_temp_s_block_img_border').css({ borderColor: '#ffffff' }); _this.addClass('now'); _this.css({ borderColor: '#ee4b4b' }); $('.img_s_title span').text(_idx+1); fix_big_btn(); //焦点图居中 if(28 <= 5){ return; } if(_idx <= 2){ $('.slide_move_bar').css({ left: 0 }); }else if(_idx >= 28 - 3){ $('.slide_move_bar').css({ left: -(28*116-5*116) }); }else{ $('.slide_move_bar').css({ left: -((_idx-2)*116) }); } }); $('.img_temp_s_block').on('mouseenter', '.img_temp_s_block_img_border:not(".now")', function(){ $(this).css({ borderColor: '#ee4b4b' }); }); $('.img_temp_s_block').on('mouseleave', '.img_temp_s_block_img_border:not(".now")', function(){ $(this).css({ borderColor: '#ffffff' }); }); //左右翻页 $('.click_to_prev').on('click', function(){ if($('.img_area img.show').index() == 0){ location.href = $('.go_to_prev').attr('href'); }else{ $('.img_temp_s_block_img_border:eq(' + ($('.img_area img.show').index()-1) + ')').trigger('click'); } }); $('.click_to_next').on('click', function(){ if($('.img_area img.show').index() == 28 - 1){ //location.href = $('.go_to_next').attr('href'); //显示最后一个广告页 $('.img_area img').stop(); $('.img_area img').animate({ opacity: 0 }, 0); $('.img_area').height(542); fix_big_btn(); $('.last_gg').show(); $('.last_gg_left img').animate({ opacity: 1 }, 0); $('.last_gg_left img').show(); }else{ $('.img_temp_s_block_img_border:eq(' + ($('.img_area img.show').index()+1) + ')').trigger('click'); } }); //键盘操作 $('body').keyup(function(event){ if(event.ctrlKey){ //翻相册 if(event.keyCode == 37){ location.href = $('.go_to_prev').attr('href'); }else if(event.keyCode == 39){ location.href = $('.go_to_next').attr('href'); } }else if(event.shiftKey){ //滚动 if(event.keyCode == 37){ $('.slide_left').trigger('click'); }else if(event.keyCode == 39){ $('.slide_right').trigger('click'); } }else{ //翻页 if(event.keyCode == 37){ $('.click_to_prev').trigger('click'); }else if(event.keyCode == 39){ $('.click_to_next').trigger('click'); } } }); //广告 $('.fix_left_gg, .fix_right_gg').on('mouseenter', function(){ $(this).find('.gg_close_btn').stop(); $(this).find('.gg_close_btn').show(250); }); $('.fix_left_gg, .fix_right_gg').on('mouseleave', function(){ $(this).find('.gg_close_btn').stop(); $(this).find('.gg_close_btn').hide(250); }); $('.gg_close_btn').on('click', function(){ $(this).parent().slideUp(); }); //原图 $('span.s_center').on('mouseenter', function(){ $(this).css({ color: '#ee4b4b' }); }); $('span.s_center').on('mouseleave', function(){ $(this).css({ color: '#999999' }); }); $('span.s_center').on('click', function(){ window.open($('.img_area img.show').attr('src')); }); //last_gg按钮点击效果 $('.btn1').on('click', function(){ $('.img_temp_s_block_img_border:eq(0)').trigger('click'); }); }); window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"1","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];