Could someone have a look at my Wikipedia Viewer and offer any suggestions for improvements

Could someone have a look at my Wikipedia Viewer and offer any suggestions for improvements
0

#1

#2

It works fine. The code is actually clean and the only two “improvements” to the JavaScript would be the following:

#1) Since all up the elements you want to slide up on the Enter keypress have a class of "results:, you do not need the following for loop:

    if (e.which == 13) {
      for (var i = 1; i <= 10; i++) {
        $(".results").slideUp(260);
      }

You can simply write:

    if (e.which == 13) {
      $(".results").slideUp(260);    

#2) The following suggest is very minor, but does reduce the total code. If you have multiple event handlers for the same element, you can use an object and define properties of the event types and use functions for the properties. So, you could replace:

$("#inpt_search").on('focus', function () {
	$(this).parent('label').addClass('active');
});

$("#inpt_search").on('blur', function () {
  if($(this).val().length == 0)
    $(this).parent('label').removeClass('active');
});

with the following:

  $("#inpt_search").on({
    focus: function() {
      $(this).parent("label").addClass("active");
    },
    blur: function() {
    if ($(this).val().length == 0)
      $(this).parent("label").removeClass("active");
    }
  });

For only two event handlers it is probably not necessary, but for 3 or more, I would definitely recommend this change. Anyway, just thought you might want to know a different way of doing the same thing in case you come across this in other code.