Skip to content

Commit

Permalink
fixed bug with disappearing load more button
Browse files Browse the repository at this point in the history
  • Loading branch information
Milan Kragujević committed May 30, 2015
1 parent 4e1f17f commit 7f43c02
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions assets/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ function loadMovies() {
}
if(data.pages < 2 || data.pages == data.page) {
$('.load-more').fadeOut(300);
window.showLoadMore = false;
} else {
$('.load-more').fadeIn(300);
window.showLoadMore = true;
}
});
$('.loading').fadeOut(300);
Expand Down Expand Up @@ -62,5 +64,10 @@ $(document).ready(function() {
$('.player').fadeOut(300);
$('.search').fadeIn(300);
$('.movies').fadeIn(300);
if(window.showLoadMore) {
$('.load-more').fadeIn(300);
} else {
$('.load-more').fadeOut(300);
}
});
});

0 comments on commit 7f43c02

Please sign in to comment.