Commit 4db7590eaaf6d4d3d9c974a1f496fd24e7359323

Authored by Nikita Fedyashev
1 parent cc084a1c
Exists in master and in 1 other branch production

PJAX pagination configuration cleanup

Showing 1 changed file with 5 additions and 6 deletions   Show diff stats
app/assets/javascripts/errbit.js
... ... @@ -39,13 +39,12 @@ $(function() {
39 39 });
40 40  
41 41 $('.notice-pagination').each(function() {
42   - $('.notice-pagination a').pjax('#content', { timeout: 2000});
43   - $('#content').bind('pjax:start', function() {
44   - $('.notice-pagination-loader').css("visibility", "visible");
45   - currentTab = $('.tab-bar ul li a.button.active').attr('rel');
46   - });
  42 + $.pjax.defaults = {timeout: 2000};
47 43  
48   - $('#content').bind('pjax:end', function() {
  44 + $('#content').pjax('.notice-pagination a').on('pjax:start', function() {
  45 + $('.notice-pagination-loader').css("visibility", "visible");
  46 + currentTab = $('.tab-bar ul li a.button.active').attr('rel');
  47 + }).on('pjax:end', function() {
49 48 activateTabbedPanels();
50 49 });
51 50 });
... ...