You are here

function views_ajax_command_scroll_top in Views (for Drupal 7) 7.3

Same name and namespace in other branches
  1. 8.3 includes/ajax.inc \views_ajax_command_scroll_top()

Scroll to top of the current view.

Return value

array An array suitable for use with the ajax_render() function.

Related topics

1 call to views_ajax_command_scroll_top()
views_ajax in includes/ajax.inc
Menu callback to load a view via AJAX.

File

includes/ajax.inc, line 172
Handles the server side AJAX interactions of Views.

Code

function views_ajax_command_scroll_top($selector) {
  $command = array(
    'command' => 'viewsScrollTop',
    'selector' => $selector,
  );
  return $command;
}