title: How to make an Option Object be selected as the Default Value
body: <p>The following code triggers just before a page is loaded. Now I've managed to fill a select with values. But I'm not sure on how to make the first value to be the deafault selected value.        </p>
  
  <pre><code>$(document).on('pagebeforeshow', '#searchpage',
  //This function is the whole function that runs when the pagebefore event occurs
  function () {
      //This reads the universities from the api we created
      $.getJSON(AddressAccess + "Home/university/format/json",
  
      function (data) {
          //The data is sent back in a collection of objects. We need to extract each object and do relative operations
          for (var i = 0; i &lt; data.length; i++) {
              var university = data[i];
              var SelectDropDown = document.getElementById("searchuniversity");
              var NewOption = new Option(university.Name, university.UniverstiyID);
  
              if (i == 1) {
                  SelectDropDown.add(NewOption, Selected);
              } else {
                  SelectDropDown.add(NewOption);
              }
  
          };
      });
  });
  </code></pre>
  
  <p>Now if i use <code>SelectDropDown.add(NewOption,Selected);</code> Only one option is made as an option in the select and what I want is to just make the first option being read from my json data to be the default option appearing in the select.</p>