transmitstudio
11/3/2016 - 9:56 PM

Scroll to top easing

Scroll to top easing

<?php
// add to functions.php
// add scrolling behaviour to 'return to top' link
// Load JavaScript correctly, modified by Masino Sinaga, June 17, 2011, in order to support animated-scroll
add_action('get_header', 'my_load_scripts');
function my_load_scripts() {
    wp_enqueue_script('scrolltotop', CHILD_URL.'/js/scroll.js', array(), '1', TRUE);
}
 
// Modify back to top text, modified by Masino Sinaga, June 17, 2011, in order to support animated-scroll
remove_filter('genesis_footer_backtotop_text', 'genesis_footer_backtotop_text');
add_filter('genesis_footer_backtotop_text', 'custom_footer_backtotop_text');
function custom_footer_backtotop_text($backtotop) {
    $backtotop = '<a id="gotop" href="#" onclick="MGJS.goTop();return false;">'. __( "Return to top of page", "genesis" ). '</a>';
    return $backtotop;
}
?>