想要標籤箭頭在懸停時滑動,但不能移動內容到直到標籤被點擊,這可能嗎?請參閱的jsfiddle例如是否可以懸停在標籤上並點擊div幻燈片
小提琴:http://jsfiddle.net/cC4tU/1/
jQuery的
jQuery.extend(jQuery.easing, {
easeInOutQuad: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t + b;
return -c/2 * ((--t)*(t-2) - 1) + b;
}
});
//EXPAND PAGE DIV CONTENT
var TabbedContent = {
init: function() {
$(".tab_item").mouseover(function() {
var background = $(this).parent().find(".moving_bg");
$(background).stop().animate({
left: $(this).position()['left']
}, {
duration: 500
});
TabbedContent.slideContent($(this));
});
},
slideContent: function(obj) {
var margin = $(obj).parent().parent().find(".slide_content").width();
margin = margin * ($(obj).prevAll().size() - 1);
margin = margin * -1;
$(obj).parent().parent().find(".tabslider").stop().animate({
marginLeft: margin + "px"
}, {
duration: 800
});
}
}
TabbedContent.init();
持續時間:800,easing:'easeInOutQuad'是嗎? – alwayslearning 2012-08-06 17:55:18