$(function() {

  $(".search-form").on("submit", function(event) {
    event.preventDefault();
  });

  $(".search-field").on("keyup", function() {
    var searchField = $(this);
    var playerName = searchField.val();
    var url = searchField.attr("action");
    var data = "search=" + playerName;
    var setting = $(".search-setting").val();

    if(playerName.length >= 3) {
      var request = $.ajax({
        url: url,
        method: "GET",
        data: data
      });

      request.done(function(response) {
        console.log(response);
        var fadeDelay = 0;
        $("#search-results").html("");

        $.each(response, function(index, player) {
          $("<li><a href='#" + player.id + "'>" + player.name + " " + player.position + " " + player.team + "</a></li>").hide().appendTo("#search-results").delay(fadeDelay).fadeIn(100);
          fadeDelay += 50;
        });
      });
    } else {
      $("#search-results").html("");
    }
  });

});

@@ -226,27 +226,33 @@
 r url = 
+$(%22.
 search
-Field
+-form%22)
 .attr(%22a
@@ -344,16 +344,38 @@
 ).val();
+%0A    console.log(url);
 %0A%0A    if
@@ -545,39 +545,8 @@
 ) %7B%0A
-        console.log(response);%0A
     
@@ -604,24 +604,60 @@
 .html(%22%22);%0A%0A
+        if(response.length %3E 0) %7B%0A  
         $.ea
@@ -691,24 +691,26 @@
 , player) %7B%0A
+  
           $(
@@ -893,16 +893,18 @@
         
+  
 fadeDela
@@ -916,28 +916,146 @@
 50;%0A        
+  
 %7D);%0A
+        %7D else %7B%0A          $(%22%3Cli%3ENo Results Found%3C/li%3E%22).hide().appendTo(%22#search-results%22).fadeIn(100);%0A        %7D%0A
       %7D);%0A  

Add message if no results found in search