title: how to get the value from dropdwon in selectpicker- it alert the value twice?
body: <p>I am using select picker . I have one dropdrown where i have get the value when the element is selected. Here is get the value successfully but it alerts me twice time when i remove the selectpicker class it gives me right result. Here is my code:-</p>
  
  <pre><code>enter code here
  &lt;select class="selectpicker show-tick getCategory" data-size="12"&gt;
      &lt;option value=""&gt;Category&lt;/option&gt;
      &lt;?php foreach ($allcategories as $key =&gt; $category) {?&gt;
          &lt;option value="{{ $category['name'] }}"&gt;{{ $category['name'] }} &lt;/option&gt;
           &lt;?php } ?&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>And here is my Jquery Code:-</p>
  
  <pre><code>enter code here
  var categoryvalue="";
      $('.getCategory').change(function(){
          categoryvalue = $(".getCategory option:selected").text();
          alert(categoryvalue);
      });
  </code></pre>
  
  <p>When i alert the categoryvalue it gives me right result but alert me twice.
  Thanks in advance :)
  I am using laravel 5.2</p>