Project Feedback - Twitch TV JSON API

Project Feedback - Twitch TV JSON API
0

#1

Some obvious drawbacks here. I haven’t implemented the online users as the first ones at the top of the page. Also, when you click online or offline, it doesn’t reformat the rows nicely. Any feedback would be great.


#2

I was wondering how you kept the active cards stay in their place. :smile:

You could apply the display: none to the parent instead; to reformat the active cards.
I believe in jQuery, you add .parent() before the .css('display', none).

$("#offline").on("click", function() {
    $("#offline").addClass("active");
    $("#all").removeClass("active");
    $("#online").removeClass("active");
    for (var i = 0; i < streamers.length; i++) {
      if ($("#" + i).children().length == 4) {
        $("#" + i).parent().css("display", "none");
      } else {
        $("#" + i).parent().css("display", "block");
      }
    }
  });

#3

That’s a good idea. I’m still new with jQuery, was looking for something like this. Going to try this out.


#4

Just implemented this change; it works and looks much better! Thanks @LetsZiggy! ^^