% content_for :tab_panes do %>
<% comparable = controller.respond_to? :compare %>
<% pane_list.each_with_index do |pane, i| %>
<% content_for :js do %>
$(document).on('<%= 'ready' if i != 0 %> arv-log-event', function() {
$.ajax('<%= url_for @object %>?tab_pane=<%= pane %>', {dataType: 'html', type: 'GET'}).
done(function(data, status, jqxhr) {
$('#<%= pane %> > div > div').html(data);
}).
fail(function(jqxhr, status, error) {
});
});
<% end %>
<% end %>
<% end %>
<% content_for :js do %>
$(window).on('load', smart_scroll_fixup);
$(document).on('shown.bs.tab', 'ul.nav-tabs > li > a', smart_scroll_fixup);
<% end %>