• UHG BPM UI DEV
    April 3, 2017 at 9:18 am #4087

    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
    May 11, 2017 at 2:13 pm #4314

    Any help would be appreciated.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Start typing and press Enter to search