HTML5历史记录 - 在后退按钮单击时淡出/淡出内容

时间:2016-12-25 15:07:40

标签: javascript jquery html5-history

我一直试图使用历史API超过一周,但作为一个相对缺乏经验的前端开发人员,一些解释超出了我的范围。 This article对我来说最有意义,但我无法使其正常工作,尤其是当标题图像保持可见但缩小时。

我想在按下“返回”按钮时撤消上一次点击中的淡化内容。这是我与之合作的当前版本:openCurrents

JSFiddle

JS

$('#intro-button-1').click(function(){
  $('#intro-1').fadeOut(777, function(){
    $('#intro-2').fadeIn(777);
  });
});

$('#intro-button-2').click(function(){
  $('#home-logo').animate({width: "400px", height: "100px"}, 1200);
  $('#intro-2').fadeOut(777, function(){
    $('#intro-3').fadeIn(777);
  });
});

$('#intro-button-3').click(function(){
  $('#intro-3').fadeOut(777, function(){
    $('#intro-4').fadeIn(777);
  });
});

$('#intro-button-4').click(function(){
  $('#intro-4').fadeOut(777, function(){
    $('#intro-5').fadeIn(777);
  });
});

0 个答案:

没有答案
相关问题