这是html
<div id="cart_table" style="width:800px; position:absolute;">
<h3>My Cart</h3>
Please check your shipping data and press "Place Order" to complete this order
</div>
和 javascript
var cartTableTop = parseInt($('#cart_table').css('top'));
$(window).scroll(function() {
$('#remove').html(cartTableTop) // just to debug
$('#cart_table').css("top", (cartTableTop) + "px");
$('#remove').html($('#remove').html()+' '+$('#cart_table').css('top'))// just to debug
});
cartTableTop
== $('#cart_table').css('top') 但 #cart_table
滚动后会向下跳。我该如何解决?