diff --git a/views_flag_refresh.info b/views_flag_refresh.info
index a18417c..8b8fc5e 100644
--- a/views_flag_refresh.info
+++ b/views_flag_refresh.info
@@ -2,6 +2,8 @@ name = Views Flag Refresh
 description = Views Flag Refresh allows site administrators to configure which views are refreshed automatically via AJAX when certain flags are selected.
 dependencies[] = flag
 dependencies[] = views
+files[] = views_flag_refresh.views.inc
+files[] = views_flag_refresh_plugin_display_extender.inc
 core = 7.x
 package = Views
 ; Information added by drupal.org packaging script on 2011-11-16
diff --git a/views_flag_refresh.module b/views_flag_refresh.module
index d9cd1e0..59fc59e 100644
--- a/views_flag_refresh.module
+++ b/views_flag_refresh.module
@@ -7,6 +7,15 @@
  */
 
 /**
+ * Implements hook_views_api().
+ */
+function views_flag_refresh_views_api() {
+  return array(
+    'api' => '3',
+  );
+}
+
+/**
  * Returns an array of flags keyed by machine readable name to an escaped
  * display name.
  *
@@ -57,50 +66,6 @@ function views_flag_refresh_widgets_get($reset = FALSE) {
 }
 
 /**
- * Implementation of hook_form_FORM_ID_alter().
- */
-function views_flag_refresh_form_views_ui_edit_display_form_alter(&$form, &$form_state) {
-  if ('use_ajax' == $form_state['section']) {
-
-    $display = &$form_state['view']->display[$form_state['display_id']];
-
-    $form['options']['use_ajax_flags'] = array(
-      '#type' => 'checkboxes',
-      '#title' => t('Refresh display on flags'),
-      '#options' => views_flag_refresh_flag_options_get(),
-      '#default_value' => (array)$display->handler->get_option('use_ajax_flags'),
-      '#description' => t('Refreshes the display via AJAX whenever a user clicks one of the selected flags. This will only take effect if the <em>Use AJAX</em> option is set to <em>Yes</em>.'),
-    );
-
-    $default_value = $display->handler->get_option('use_ajax_flags_widget');
-    $form['options']['use_ajax_flags_widget'] = array(
-      '#type' => 'radios',
-      '#title' => t('Refresh widget'),
-      '#options' => views_flag_refresh_widget_options_get(),
-      '#default_value' => $default_value ? $default_value : 'default',
-      '#description' => t('The widget alters the display of the view as it is refreshing, for example by adding a throbber or textual message.')
-    );
-
-    // Adds our custom submit handler before the default so we don't have to
-    // re-cache the view in order to add our custom option.
-    // NOTE: $form['#submit'] doesn't work here.
-    array_unshift(
-      $form['buttons']['submit']['#submit'],
-      'views_flag_refresh_views_ui_edit_display_form_submit'
-    );
-  }
-}
-
-/**
- * Processes views_ui_edit_display_form form submissions.
- */
-function views_flag_refresh_views_ui_edit_display_form_submit(&$form, &$form_state) {
-  $display = &$form_state['view']->display[$form_state['display_id']];
-  $display->handler->set_option('use_ajax_flags', $form_state['values']['use_ajax_flags']);
-  $display->handler->set_option('use_ajax_flags_widget', $form_state['values']['use_ajax_flags_widget']);
-}
-
-/**
  * Preprocess the primary theme implementation for a view.
  *
  * If AJAX is enabled for the view, adds javascript files and settings.
@@ -186,4 +151,18 @@ function views_flag_refresh_views_flag_refresh_widgets() {
   );
 
   return $widgets;
-}
\ No newline at end of file
+}
+
+/**
+ * Implements hook_views_ajax_data_alter().
+ */
+function views_flag_refresh_views_ajax_data_alter(&$commands, $view) {
+  if ($view->query->pager->display->handler->options['use_ajax_flags_noscrolltop']) {
+    foreach ($commands as $key => $command) {
+      // Remove scrollTop command.
+      if ($command['command'] == 'viewsScrollTop') {
+        unset($commands[$key]);
+      }
+    }
+  }
+}
diff --git a/views_flag_refresh.views.inc b/views_flag_refresh.views.inc
new file mode 100644
index 0000000..4bfbab2
--- /dev/null
+++ b/views_flag_refresh.views.inc
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Implements hook_views_plugins().
+ */
+function views_flag_refresh_views_plugins() {
+  $path = drupal_get_path('module', 'views_flag_refresh');
+  $plugins = array();
+  $plugins['display_extender']['views_flag_refresh'] = array(
+    'title' => t('Refresh view by Flag'),
+    'path' => $path,
+    'handler' => 'views_flag_refresh_plugin_display_extender',
+  );
+  return $plugins;
+}
diff --git a/views_flag_refresh_plugin_display_extender.inc b/views_flag_refresh_plugin_display_extender.inc
new file mode 100644
index 0000000..6464f8d
--- /dev/null
+++ b/views_flag_refresh_plugin_display_extender.inc
@@ -0,0 +1,104 @@
+<?php
+/**
+ * @file
+ * Views field view field handler class.
+ * 
+ */
+
+/** 
+ * The plugin that added additional setting to views edit form.
+ * 
+ * @ingroup views_display_plugins 
+ */
+class views_flag_refresh_plugin_display_extender extends views_plugin_display_extender {
+  /** 
+   * Provide a form to edit options for this plugin. 
+   */
+  function option_definition(&$options = array()) {
+    $options['use_ajax_flags'] = array('default' => FALSE);
+    $options['use_ajax_flags_noscrolltop'] = array('default' => 0);
+    $options['use_ajax_flags_widget'] = array('default' => 'default');
+  } 
+ 
+  /** 
+   * Provide the form to set new option. 
+   */
+  function options_form(&$form, &$form_state) { 
+    switch ($form_state['section']) { 
+      case 'views_flag_refresh':
+       
+        $form['use_ajax_flags'] = array(
+          '#type' => 'checkboxes',
+          '#title' => t('Refresh display on flags'),
+          '#options' => views_flag_refresh_flag_options_get(),
+          '#default_value' => (array)$this->display->get_option('use_ajax_flags'),
+          '#description' => t('Refreshes the display via AJAX whenever a user clicks one of the selected flags. This will only take effect if the <em>Use AJAX</em> option is set to <em>Yes</em>.'),
+        );
+
+        $form['use_ajax_flags_noscrolltop'] = array(
+          '#type' => 'checkbox',
+          '#title' => t('Disable scroll to top of this view.'),
+          '#default_value' => $this->display->get_option('use_ajax_flags_noscrolltop'),
+          '#description' => t('Check if you want disable scroll to the top of this view after AJAX update.'),
+        );
+
+
+        $default_value = $this->display->get_option('use_ajax_flags_widget');
+        $form['use_ajax_flags_widget'] = array(
+          '#type' => 'radios',
+          '#title' => t('Refresh widget'),
+          '#options' => views_flag_refresh_widget_options_get(),
+          '#default_value' => $default_value ? $default_value : 'default',
+          '#description' => t('The widget alters the display of the view as it is refreshing, for example by adding a throbber or textual message.')
+        );
+
+        break; 
+    } 
+  } 
+    
+  /** 
+   * Inserts the code into the view display. 
+   */
+  function options_submit(&$form, &$form_state) { 
+    switch ($form_state['section']) { 
+      case 'views_flag_refresh':
+        $this->display->set_option('use_ajax_flags', $form_state['values']['use_ajax_flags']);
+        $this->display->set_option('use_ajax_flags_noscrolltop', $form_state['values']['use_ajax_flags_noscrolltop']);
+        $this->display->set_option('use_ajax_flags_widget', $form_state['values']['use_ajax_flags_widget']);
+        break; 
+    } 
+  } 
+ 
+  /** 
+   * Summarizes new option. 
+   * 
+   * Lists the fields as either 'Yes' if there is text or 'None' otherwise and
+   * categorizes the fields under the 'Other' category. 
+   */
+  function options_summary(&$categories, &$options) {
+    $flags = $this->display->get_option('use_ajax_flags');
+    $flags_selected = array();
+    if (is_array($flags)) {
+      $flags_names = views_flag_refresh_flag_options_get();
+      foreach ($flags as $flag) {
+        if ($flag) {
+          $flags_selected[] = $flags_names[$flag];
+        }
+      }
+    }
+
+    if ($flags_selected) {
+      $flags_selected = implode(', ', $flags_selected);
+    }
+    else {
+      $flags_selected = t('None');
+    }
+
+    $options['views_flag_refresh'] = array(
+      'category' => 'other', 
+      'title'    => t('Flag refresh'),
+      'value'    => $flags_selected,
+      'desc'     => t('Choose flags that can refrsh display.'),
+    ); 
+  } 
+}
