title: Show alert message if value not selected in dropdown in jquery
body: <p>I am trying to show alert popup when the user didn't select any value from the dropdown</p>
  
  <p>Here is my html :</p>
  
  <pre><code>&lt;div id="reminder" class="popup-layout"&gt;
      &lt;form id="reminderForm" method="post"&gt;
      &lt;div class="modal followup-modal ui-draggable" id="reminderPopupdrag" tabindex="-1" role="dialog"&gt;
          &lt;div class="modal-dialog modal-lg" role="document"&gt;
              &lt;div class="modal-content"&gt;
                  &lt;div id="errorInPopup" class="error displayInlineBlock"&gt;&lt;/div&gt;
                  &lt;div class="modal-header"&gt;
                      &lt;h5 class="modal-title"&gt;select_followup&lt;/h5&gt;
                  &lt;/div&gt;
                  &lt;div class="modal-body"&gt;
                      &lt;table class="width100percent"&gt;
                          &lt;tbody&gt;&lt;tr&gt;
                              &lt;td&gt;
                                  &lt;label&gt;&lt;input type="radio" name="reminder" id="reminder-1" value="1" class="element full-width verticalAlignMiddle"&gt;close_with_reminder&lt;/label&gt;                            &lt;/td&gt;
                              &lt;td class="textAlignRight"&gt;
                                  &lt;input type="text" id="reminderdate" name="reminderdate" class="marginRight5 displayNone"&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td colspan="2"&gt;
                                  &lt;input type="text" name="reminderText" id="reminderText" value="" class="element displayNone width-full marginTop5" placeholder="add_remark_here"&gt;                            &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td colspan="2"&gt;
                                  &lt;label&gt;&lt;input type="radio" name="reminder" id="reminder-2" value="2" class="element full-width"&gt;close_without_reminder&lt;/label&gt;                            &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td colspan="2"&gt;
                                  &lt;select name="reminderclosereason" id="reminderclosereason" class="element displayNone width100percent"&gt;
      &lt;option value="0"&gt;Select value&lt;/option&gt;
      &lt;option value="6"&gt;Advertisements&lt;/option&gt;
      &lt;option value="4"&gt;Another reason:&lt;/option&gt;
      &lt;option value="17"&gt;Checking  financial terms and conditions&lt;/option&gt;
      &lt;option value="16"&gt;Company not leasable&lt;/option&gt;
      &lt;option value="18"&gt;Future potential clients  &lt;/option&gt;
      &lt;option value="20"&gt;Offer is of vehicle type in which we do not do business&lt;/option&gt;
      &lt;option value="12"&gt;Open application&lt;/option&gt;
      &lt;option value="13"&gt;Order&lt;/option&gt;
      &lt;option value="10"&gt;Other ticket already in progress&lt;/option&gt;
      &lt;option value="11"&gt;Out of office reply &lt;/option&gt;
      &lt;option value="50"&gt;Portal, ad removed, payment, offer withdrawn&lt;/option&gt;
      &lt;option value="7"&gt;SPAM&lt;/option&gt;
      &lt;option value="9"&gt;Unsubscribe MFO Mailing&lt;/option&gt;
      &lt;option value="2"&gt;Vehicle/part is sold (indicate order number!)&lt;/option&gt;
      &lt;option value="8"&gt;Vehicle/part not on stock (is looking for something else)&lt;/option&gt;
      &lt;option value="1"&gt;Vehicles too expensive&lt;/option&gt;
  &lt;/select&gt;                            &lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/tbody&gt;&lt;/table&gt;
                  &lt;/div&gt;
                  &lt;div class="modal-footer"&gt;
                          &lt;input type="submit" name="send" id="sendPreview" value="Save" class="defaultbutton displayNone"&gt;                &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And i have tried like this in my js function page:</p>
  
  <pre><code>var TICKET = {};
  
  TICKET.preview = {
  
      init: function () {
          this.bindUI();
      },
  
      bindUI: function () {
          var self = this;
          $('#send').click(function () {
              self.followupPopup();
          });
  
          $(document).on('change', 'input[name=reminder]', function () {
              $('#sendPreview').show();
  
              if ($(this).val() == 1) {
  
                  $('#reminderdate').datetimepicker({
                      showOn: "button",
                      buttonImage:vbdBaseUrl + '/images/calendar.png',
                      dateFormat:'dd-mm-yy',
                      timeFormat: 'HH:mm',
                      buttonImageOnly: true,
                      controlType: 'select',
                      showWeek: true,
                      firstDay: 1,
                      oneLine : true,
                  });
  
                  /**
                   * To display the tomorrows date and time as 8AM by default in datepicker input box.
                   */
                  var today = new Date();
                  var tomorrow = new Date();
                  tomorrow.setDate(today.getDate() + 1);
                  tomorrow.setHours(8);
                  tomorrow.setMinutes(0);
                  $('#reminderdate').datetimepicker('setDate', new Date(tomorrow));
                  $('#reminderText').show();
                  $('#reminderdate').show();
                  $('.ui-datepicker-trigger').show();
                  $('#reminderclosereason').hide();
                  $('#saveReminder').show();
  
                  return true;
              }
  
              $('#reminderText').hide();
              $('#reminderdate').hide();
              $('.ui-datepicker-trigger').hide();
              $('#reminderclosereason').show();
              $('#saveReminder').show();
  
          });
  
          $('#reminderForm').submit(function() {
              if ('' == $('#reminderclosereason').val() &amp;&amp; $('input[name=reminder]:checked').val()!= 1) {
                  $('#errorInPopup').html('please select close reason');
  
                  return false;
              }
          });
      },
  
      followupPopup: function () {
          var request = BAS.ajax;
  
          request.url = vbdBaseUrl + '/ticket/mail/follow-up';
  
          request.method = 'POST';
  
          request.data = {
              ticketId : ticketId
          }
  
          request.ajaxRequest(function(response) {
              $('#reminderPopup').html(response);
              $('#reminderPopupdrag').draggable();
              $('.popup-dragable').show();
          });
      }
  
  };
  
  $(function () {
      TICKET.preview.init();
  });
  </code></pre>
  
  <p>I have tried a lot of solution. but none of the things work in my case.
  I haven't understood what wrong in this case. i am trying to check the condition  if dropdown value not selected or drop-down value is 0 I would like to show alert</p>
  
  <p>Can anyone help me</p>
  
  <p>Thanks in advance.</p>