UHG BPM UI DEV
Hi Folks,
Anybody has implemented scroll to top method with Spark controls. If I call below method using OOTB control, the functionality works fine. But when I use the same function with spark controls, it is not working. I am not able to figure out the issue. If any one help me out.
I need to implement this on Spark button click.
scrollToTop()
<script src=”//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js”></script>
<script>
function scrollToTop() {
alert(“in”);
//window.scrollTo(0, 500);
verticalOffset = typeof(verticalOffset) != ‘undefined’ ? verticalOffset : 0;
element = $(‘body’);
offset = element.offset();
console.log(“offset” +offset);
offsetTop = offset.top;
console.log(“offsettop” +offsetTop);
$(‘html, body’).animate({scrollTop: offsetTop}, 500, ‘linear’);
}
</script>
UHG BPM UI DEV
Any help would be appreciated.