[英]make div appear instead of sliding to location
我有一個進度條,應該轉到六個縮略圖之一,具體取決於您單擊哪個縮略圖。 在正確的意義上,它可以正常工作,並且可以正常工作。 問題是,我需要它在移動時消失,並在停止移動時重新出現。 我嘗試使用hide
,但是效果不佳。 該腳本是
$(function(){
$("#content div:not(.control)").bind('touchstart click', function() {
$(".control").animate({ top: $(this).offset().top, height: $(this).height() });
});
});
有人可以幫我找到最好的方法嗎? 謝謝
如果我做對了,也許這樣做會:
$("#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();
}
);
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.