function views_refresh_ajax_command_refresh_scroll in Views Refresh 7
Creates a Drupal Ajax 'viewsRefresh' command with scrolling to top.
Parameters
string $selector: A jQuery selector string for the root DOM element of the view.
int $first_page: Whether the first page must be loaded instead of the current page.
Return value
array An array suitable for use with the ajax_render() function.
File
- ./
views_refresh.module, line 74 - Views Refresh module.
Code
function views_refresh_ajax_command_refresh_scroll($selector, $first_page = FALSE) {
return array(
'command' => 'viewsRefresh',
'selector' => $selector,
'scroll' => 1,
'first' => intval($first_page),
);
}