title: Cant disable Button using jquery in Django
body: <p>I have i simple jquery function to disable a Button if the selected dropdown value is blank. But it wont work and i'm not sure why? </p>
  
  <p>Here's my HTML:</p>
  
  <pre><code>&lt;form action="{% url 'select_controller' id=i.ID  %}" method="post"&gt;
  {% csrf_token %}
  &lt;td&gt;
      &lt;select class="form-control"  name="controller" id="select_controller"&gt;
      {% if i.proposal_status == "Changes needed" %}
          &lt;option value={{ i.ID_fk }}&gt;  {{ i.ID_fk.last_name }}, {{ i.ID_fk.first_name }}&lt;/option&gt;
      {% else %}
          &lt;option value='blank'&gt;  -&lt;/option&gt;
          {% for controller in list_controller %}
              &lt;option value={{ controller }}&gt;  {{ controller.last_name }}, {{ controller.first_name }}&lt;/option&gt;
          {% endfor %}
      {% endif %}
  
      &lt;/select&gt;
  &lt;/td&gt;
  &lt;td&gt;
      {% if count_controller &lt; 2 %}
          &lt;button id="button"  class="btn btn-primary" type="submit" value="Submit" &gt; Send &lt;/button&gt;
      {% else %}
          Only two regs
      {% endif %}
  &lt;/td&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>And this is my jQuery:</p>
  
  <pre><code>$("select").on('change',function(){
     if($(this).find('option:selected').text()=="-")
        $("#button").attr('disabled',true)
     else
        $("#button").attr('disabled',false)
  });
  </code></pre>
  
  <p>I'm new to Javascript/jQuery but i think there is only one little thing i forgot </p>