title: jQuery - cancel change event on confirmation dialog for a Dropdown
body: <p>I have a dropdown and I have the jQuery <code>change</code> function.</p>
  
  <p>I would like to implement the change of the selected item as per the Confirmation dialog.</p>
  
  <p>If confirms true i can proceed for selected change otherwise I have keep the existing item as selected and cancel the change event.</p>
  
  <p>How can I implement this with jQuery?</p>
  
  <p>jquery Function </p>
  
  <pre><code>$(function () {
      $("#dropdown").change(function () {
          var success = confirm('Are you sure want to change the Dropdown ????');
          if (success == true) {
              alert('Changed');  
              // do something                  
          }
          else {
              alert('Not changed');
              // Cancel the change event and keep the selected element
          }
      });
  });
  </code></pre>
  
  <p>One thing to remember <code>change</code> function hits only after selected item changed
  So better to think to implement this on <code>onchange</code> - but it is not available in jquery. Is there any method to implement this?</p>