title: How to pass <select> html data in bootstrap modal to jquery
body: <p>I'm trying to figure out how to pass the selected value from this  tag that is located in a <strong>modal</strong>:</p>
  
  <pre><code>&lt;div class='row'&gt;
  &lt;div class='col-md-8'&gt;
  &lt;form class='form-inline'&gt;
  &lt;select class='form-control' name='sel1' id='sel1'&gt;
        &lt;option&gt;1.00&lt;/option&gt;
        &lt;option&gt;1.25&lt;/option&gt;
        &lt;option&gt;1.50&lt;/option&gt;
        &lt;option&gt;1.75&lt;/option&gt;
        &lt;option&gt;2.00&lt;/option&gt;
        &lt;option&gt;2.25&lt;/option&gt;
        &lt;option&gt;2.50&lt;/option&gt;
        &lt;option&gt;2.75&lt;/option&gt;
        &lt;option&gt;3.00&lt;/option&gt;
        &lt;option&gt;5.00&lt;/option&gt;
        &lt;option&gt;INC&lt;/option&gt;
        &lt;option&gt;DRP&lt;/option&gt;
        &lt;option&gt;WDRW&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;/div&gt;
  &lt;div class='col-md-4' align='right'&gt;
  &lt;input style='display: block; width: 100%;' type='button' class='btn btn-success' value='Enter Grade' onclick='enterGrade($offeringno)'' /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Here is my jquery code:</p>
  
  <pre><code>function enterGrade(offering) {
    var enteredgrade = $("#myModal3 #sel1").val();
    var gradeoffering = offering;
    alertify.confirm("Enter grade?", function (e)
    { if (e) {
      $.ajax({
          url : "action.php",
          type : "POST",
          data : {
              gradeofferingPost : gradeoffering,
              enteredgrade1: enteredgrade
          },
          success : function(data) {
            alertify.alert(data);
            show_test();
          }});
        $('#myModal3').modal('toggle');
    } else {
        txt = "You pressed Cancel!";
    } });
  }
  </code></pre>
  
  <p>What is the correct syntax to get the selected option from the <code>sel1</code> select (that is inside a <strong>modal</strong>) to the javascript function?</p>