anchor.diff:      });
       
       $('tr.trip a[data-remote]').live('ajax:success', function(e, data, status, xhr){
  +      scroll_positions = {scrollX: $(window).scrollLeft(), scrollY: $(window).scrollTop()};
  +      // console.log ('scroll_positions after setting', scroll_positions);
  +      replace_index_state(); // make sure the scrollstate is recorded
         push_edit_state($(this).attr("href"));
         load_edit_trip(data.form);
       });
  
positive.code:                 table.append(row);
                })
                $("tr:odd").addClass("odd");
              }
            );
          },
  
negative.code:     }
      
      function push_index_state() {
        // console.log ('scroll_positions in push_index_state', scroll_positions);
        if (supports_history_api()) history.pushState({index: calendar_range, scroll_positions: scroll_positions}, "list trips", "<%= trips_path %>?" + $.param(calendar_range));
      }
      
      function replace_index_state() {
        // console.log ('scroll_positions in replace_index_state', scroll_positions);
        if (supports_history_api()) history.replaceState({index: calendar_range, scroll_positions: scroll_positions}, "list trips", "<%= trips_path %>?" + $.param(calendar_range));
      }
      
      function push_edit_state(path) {
        // console.log ('scroll_positions in push_edit_state', scroll_positions);
        if (supports_history_api()) history.pushState({edit: path}, "edit trip", path);
      }
      
  