title: How to apply floating label to select2 dropdown?
body: <p>I'm using select2 plugin for select dropdown. I have more than one select dropdown boxes in the page and I need to apply the floating label to the selected dropdown.</p>
  
  <p>I have tried and googled but I could not find any desired results as I expected.</p>
  
  <p>I have provided the code that I have tried so far.</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;div class="container"&gt;
    &lt;div class="row"&gt;
      &lt;div class="col-md-6 col-lg-6 col-sm-6"&gt;
        &lt;label class="hor-menu visible-xs visible-xs control-label col-sm-1"&gt;&lt;/label&gt;
        &lt;div class="form-group form-md-line-input form-md-floating-label" style="margin-top: 13px;"&gt;
          &lt;select name="cboNGrp" id="cboNGrp" class="form-control select2me input-xlarge" data-live-search="true" data-size="8"&gt;&lt;/select&gt;
          &lt;label class="form_control_1 head_ctrl_label" style="padding-top: 2px;"&gt;Type&lt;/label&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="col-md-6 col-lg-6 col-sm-6"&gt;
        &lt;div class="form-group form-md-line-input head_ctrl"&gt;
          &lt;label class="hor-menu visible-xs visible-xs control-label  col-sm-1"&gt;&lt;/label&gt;
          &lt;select name="cboEmrGrp" id="cboEmrGrp" class="select2me form-control input-xlarge"&gt;&lt;/select&gt;
          &lt;label class="form_control_1 head_ctrl_label"&gt;E / M&lt;/label&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>JS</strong></p>
  
  <pre><code>$('.select2me').click(function(e){
      if($(this).find('select2-dropdown-open')) {
          $('label.head_ctrl_label').css('margin-top', '-25px'); 
      }
      e.preventDefault();
  });
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/V13Bl.png" rel="nofollow noreferrer">Image showing user clicks the Dropdown to select Option</a></p>
  
  <p><a href="https://i.stack.imgur.com/sKrGG.png" rel="nofollow noreferrer">Image showing the bug floating label applies to all the dropdown not only selected one</a></p>