2013-06-21 21 views

答えて

16

あなたが行く:

var trueDivHeight = $('.someclass')[0].scrollHeight; 
var divHeight = $('.someclass').height(); 
var scrollLeft = trueDivHeight - divHeight; 
alert(scrollLeft); 

簡体

15

はここでパディングを占め、直接DOM要素にアクセスするのではなく、propを使用したバージョンです。

$('#box').prop('scrollHeight') - $('#box').innerHeight(); 
0

こちらをご覧完全な答え:jQueryを使っていることを使用する方法について

https://stackoverflow.com/a/48246003/7668448

何を:

var max = $('#element')[0].scrollLeftMax; // when using the polyfill 
var max = $('#element')[0].scrollLeftMaxi(); // when using the other alternative more support IE6+ 
関連する問題