title: How do I assign different data-target to different option values so different models shows up?
body: <p>I tried both switch cases and if else statements to get models with id accept, reject, review to show up but none is working for me. I just want to confirm if I am doing something wrong in terms of logic and syntax.</p>
  
  <pre><code>&lt;select class="input-sm form-control" id="pendingbulk"&gt;
     &lt;option value="0"&gt;Bulk Actions&lt;/option&gt;
     &lt;option value="1"&gt;Accept&lt;/option&gt;
     &lt;option value="2"&gt;Reject&lt;/option&gt;
     &lt;option value="3"&gt;Report&lt;/option&gt;
  &lt;/select&gt;
  &lt;button class="btn btn-sm btn-default" id="pendingapply" data-toggle="modal"&gt;Apply&lt;/button&gt;
  &lt;script&gt;
     $("#pendingapply").click(function() {
     var action = $('#pendingbulk').val();
     switch(parseInt(action)) {
     case 1:
       $(this).data("target") === "#accept";
       break;
     case 2:
       $(this).data("target") === "#reject";
       break;
     case 3:
       $(this).data("target") === "#report";
       break;
     default:
     });
  &lt;/script&gt;
  </code></pre>
  
  <p>or </p>
  
  <pre><code>&lt;script&gt;
     $("#pendingapply").click(function() {
     var action = $('#pendingbulk').val();
     if (action = 1) {
       $(this).data("target") === "#accept";
     } else if (action = 2) {
       $(this).data("target") === "#reject";
     } else if (action = 3) {
       $(this).data("target") === "#report";
     };
     });
  &lt;/script&gt;
  </code></pre>