Skip to content
Snippets Groups Projects
Commit af9c3c09 authored by Joey Ballentine's avatar Joey Ballentine
Browse files

Made ratings work sorta

parent 11d459c6
No related branches found
No related tags found
No related merge requests found
...@@ -311,7 +311,17 @@ $(document).ready(function() { ...@@ -311,7 +311,17 @@ $(document).ready(function() {
$("#show-description").empty().append(show.description); $("#show-description").empty().append(show.description);
$("#show-description").empty().append(show.description); $("#show-description").empty().append(show.description);
$(".show-img-container").empty().append("<img src=\"" + show.imgPath + "\">"); $(".show-img-container").empty().append("<img src=\"" + show.imgPath + "\">");
$("#show-rating-year").empty().append("X Stars" + " - " + show.year); $("#show-rating-year").empty();
for (let i = 0; i < Math.floor(show.rating/2); i++) {
$("#show-rating-year").append("+")
}
if (show.rating % 2 === 1) {
$("#show-rating-year").append("±")
}
for (let i = 5; i > Math.ceil(show.rating/2); i--) {
$("#show-rating-year").append("-")
}
$("#show-rating-year").append(" " + show.year);
if ($('.page-content').is(':visible')) { if ($('.page-content').is(':visible')) {
$('.page-content').slideUp(300); $('.page-content').slideUp(300);
cameFromSearch = false; cameFromSearch = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment