Weird result when animating line-height with jQuery

I have a table with four rows, whose line-height I want to animate with jQuery. I use the following code to shrink and hide the rows: $("table tr").animate({ 'line-height': 'hide' }, 5000); But instead of starting to shrink the rows from their current height, it first makes them really huge, and then starts shrinking. Press the Hide button in this fiddle to see it in action: It happens in Chrome and Firefox. Is this a bug in jQuery, or am I doing something wrong?
Perhaps becuase hide is not a valid css property so it doesn't know how to animate that.

以上就是Weird result when animating line-height with jQuery的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » jQuery 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准