Skip to content

Commit

Permalink
Add [role=spinner] to identify the spinner element (See #5, #9).
Browse files Browse the repository at this point in the history
  • Loading branch information
rstacruz committed Aug 21, 2013
1 parent 9f05639 commit 5e295fe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nprogress.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
trickleRate: 0.02,
trickleSpeed: 800,
showSpinner: true,
template: '<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner"><div class="spinner-icon"></div></div>'
template: '<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'
};

/**
Expand Down Expand Up @@ -178,7 +178,8 @@
transform: 'translate3d('+perc+'%,0,0)'
});

if(!Settings.showSpinner) $el.find('.spinner').hide();
if (!Settings.showSpinner)
$el.find('[role="spinner"]').remove();

$el.appendTo(document.body);

Expand Down

0 comments on commit 5e295fe

Please sign in to comment.