How to get the selected value of a dropdown inside panel? I have an exposed filter inside the panel. 

I want to filter the taxonomy term. For that I add "Content: Has taxonomy term (exposed)" field.

I need to get the selected value in js.

Drupal.behaviors.mymodule = {
  attach: function (context, settings) {
    var tid = $('#edit-tid').val();
    alert(tid);

  }
};


In alert I am getting "All" rather than the selected tid, as shown in this image:
Apply little trick and my issue solved. Used default taxonomy search and hide it.

(function($) {

Drupal.behaviors.tushar_1 = {
  attach: function (context, settings) {
    $('#edit-shs-term-node-tid-depth').change(function(){
      var eid = $('#edit-shs-term-node-tid-depth').val();
      $('#edit-tid ').val(eid);
    });
  }
};

})(jQuery);


Solved my issue.