title: TypeError: blur is not a function
body: <p>In my JQuery UI autocomplete function, I use <code>.blur()</code> to close IOS keyboard when a selection is made:</p>
  
  <pre><code>// Purpose: Instantiate Autocomplete
      function autocomplete() {
          searchInput.autocomplete({
              source: autocompleteCourts,
              minLength: 3,
              select: function (event, ui) {
                  location.hash = "trigger-header";
                  isEFile(event, ui);
  
                  // Close keyboard on IOS when an option is selected
                  ui.blur();
              }, open: function (event, ui) {
                  $("li.ui-menu-item:odd").addClass("ui-menu-item-alternate");
                  $(".ui-menu-item-alternate").css("background-color", "#f2f4f7");
                  $("ul.ui-menu").addClass("mt-2 w-auto");
                  $("ul.ui-menu").css("z-index", 0);
              }
          });
  </code></pre>
  
  <p>The browser is throwing the error <code>Uncaught TypeError: ui.blur is not a function</code>.</p>
  
  <p>Should I check if the function <code>blur()</code> exists before calling it?</p>