0

我有一个进度条,它应该转到六个缩略图之一,具体取决于您单击哪一个。从某种意义上说,它可以正常工作,并且可以正常工作。问题是,我需要它在移动时消失,并在停止移动时重新出现。我尝试使用hide,但这并不完全奏效。脚本是

 $(function(){
  $("#content div:not(.control)").bind('touchstart click', function() {
   $(".control").animate({ top: $(this).offset().top, height: $(this).height() });
  });
   });

有人可以帮我找到最好的方法吗?谢谢

4

1 回答 1

1

如果我做对了,也许会这样做:

$("#content div:not(.control)").bind('touchstart click', function() {
  // first, we hide .control, then do animation, then in the callback we do fadeIn
  $(".control").hide().animate({
    top: $(this).offset().top,
    height: $(this).height()
    }, function() {
       $(this).fadeIn();
    }
  );
});
于 2012-05-19T06:54:52.780 回答