我正在使用 jdev11.1.1.6
如果我需要滚动到页面顶部..这完美..
var scrollTop = function (event) {
$('.mainWrapper,body,html').animate( {
scrollTop : 0
}, 'slow');
}
我把它从 pqr.jsff 称为
<af:commandLink text="click test" clientComponent="true" id="col7">
<af:clientListener method="scrollTop " type="click"/>
</af:commandLink>
我修改了我的功能如下,但它对我不起作用
var scrollToSpecificPosition= function (event) {
$('.mainWrapper,body,html').animate( {
scrollTop : $("#gl1").offset().top
}, 'slow');
}
gl1 是我希望指向的 id
<af:goLink id="gl1" text="test"></af:goLink>
我把它从 pqr.jsff 称为
<af:commandLink text="click test" clientComponent="true" id="col7">
<af:clientListener method="scrollToSpecificPosition" type="click"/>
</af:commandLink>