$("a.details")
.click(function() {
var $this = $(this);
$this.parents(".subscription")
.find('.plan-details')
.stop(true, true)
.animate({
height: ['toggle', 'easeOutBounce']
}, 'slow',
function() {
$this.text(function (i, text) {
return text == 'View Details' ? 'Hide Details' : 'View Details';);
}) ,
function (e) {
$this.parents(".subscription")
.find('.plan-details')
.stop(true, true)
.animate({
height: 'toggle'
});
});
小提琴:http://jsfiddle.net/6fCrd/滑動和彈跳
...不知道我在做什麼錯在這裏,這是行不通的。它應該隨着反彈效果而下滑並且還要改變觸發文本。
也許添加[小提琴] (http://jsfiddle.net)所以我們可以看到它在行動 –
對不起,現在加入 – 3zzy