?
This document uses PHP Chinese website manual Release
獲取匹配元素相對滾動條左側(cè)的偏移。
此方法對可見和隱藏元素均有效。
設(shè)定水平滾動條值
獲取第一段相對滾動條左側(cè)的偏移
<p>Hello</p><p>2nd Paragraph</p>
var p = $("p:first"); $("p:last").text( "scrollLeft:" + p.scrollLeft() );
<p>Hello</p><p>scrollLeft: 0</p>
設(shè)置相對滾動條左側(cè)的偏移
$("div.demo").scrollLeft(300);