Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // http://www.gravityhelp.com/forums/topic/how-to-manage-page-breaks-to-go-to-top-of-page
- // scroll to top on load for multi-page form
- // only enqueue the scroll to top script when form 3 is being embedded
- add_action('gform_enqueue_scripts_3', 'enqueue_scroll_to_top', 10, 2);
- function enqueue_scroll_to_top($form, $is_ajax) {
- // enqueue the scroll to top script which is stored in the child theme /js/ subdirectory, and depends on jQuery
- wp_enqueue_script('scroll_to_top', get_stylesheet_directory_uri() . '/js/scroll-to-top.js', array('jquery'));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement