Use id attribute to query reading progress element (#467)

no issue
- using an `id` selector doesn't break if other `progress` elements are present on a page
This commit is contained in:
Nulla Wu 2018-08-03 16:21:05 +08:00 committed by Kevin Ansfield
parent 1bf2cdb52a
commit 9b56779ca6
2 changed files with 2 additions and 2 deletions

View file

@ -20,7 +20,7 @@
{{> "icons/facebook"}}
</a>
</div>
<progress class="progress" value="0">
<progress id="reading-progress" class="progress" value="0">
<div class="progress-container">
<span class="progress-bar"></span>
</div>

View file

@ -143,7 +143,7 @@ $(document).ready(function () {
$postContent.fitVids();
// End fitVids
var progressBar = document.querySelector('progress');
var progressBar = document.querySelector('#reading-progress');
var header = document.querySelector('.floating-header');
var title = document.querySelector('.post-full-title');