Problem Populating Drop-Down on Hover Event

Problem Populating Drop-Down on Hover Event

Hi, I am *very* new to JavaScript and jQuery and programming in general.
I have a drop-down that gets populated, on a hover event, from a list of jpg files in a directory on the server and adds them  to the drop-down list.
This works well but the page has to be refreshed when files are deleted or added to the directory, to view them in the drop-down.
Someone has very kindly been helping me to try and make this dynamic, so hovering over the drop-down will update the list.
But the script does not appear to run (or stops soon after beginning).
Firefox and Chrome debuggers both find an issue with the code.
This is the function part from the following code (the 2nd line).
Firefox states: SyntaxError: missing ( before formal parameters.
Chrome states: Uncaught SyntaxError: Unexpected token.

  1. $("#file-browser").hover(
      function {
        url: "my_dropdown_data.php",
        dataType: "json",
        success: function(response) {
          $("#file-list").html(""); //Clear current file list
          response.forEach(
            function(file) {
              $("#file-list").append("<a href='upload/" + file + "'>" + file + "</a>");
            }
          );
        },
        error: function(response) {
          console.log(response);
        }
      }
    );
Does anyone have any idea on how I can fix this please?