title: Disabled button can still open Modal dialog with data-toggle
body: <p>I have a button that opens a dialog. I only want it to open when the button isn't disabled (either with the css class or with the disable property on the span element. Is that possible? I think it's no possible and I can only fix it by removing the nice <code>data-toggle="modal"</code> feature, and do that part with my own javascript. I would prefer getting the best from both.</p>
  
  <p>Button:</p>
  
  <pre><code>&lt;span title="View Package Log" data-toggle="tooltip"&gt;
      &lt;span id="logComputerPackageComputerAndDevice" 
            data-toggle="modal" 
            data-target="#computerPackgageLogDialog" 
            class="btn btn-primary disabled" 
            disabled&gt;
          &lt;i class="fa fa-file-text-o"&gt;&lt;/i&gt; Package Log
      &lt;/span&gt;
  &lt;/span&gt;
  </code></pre>
  
  <p>Modal dialog:</p>
  
  <pre><code>&lt;!-- Modal --&gt;
  &lt;div id="computerPackgageLogDialog" class="modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt;
      &lt;div class="modal-dialog modal-lg"&gt;
          &lt;div class="modal-content"&gt;
              &lt;div class="modal-header"&gt;
                  &lt;button type="button" class="close" data-dismiss="modal" aria-label="Close"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;/button&gt;
                  &lt;h4 class="modal-title" id="computerPackgageLogDialogHeader"&gt;&lt;/h4&gt;
              &lt;/div&gt;
              &lt;div class="modal-body"&gt;
                  &lt;form&gt;
                      &lt;div class="form-group"&gt;
                          @Html.TextArea("computerPackgageLogContent", "", new { @class = "form-control", rows = "20", @readonly = "readonly" })
                      &lt;/div&gt;
                  &lt;/form&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>UPDATE:
  JavaScript Event Handling added:</p>
  
  <pre><code>$('body').on('click', '#logComputerPackageComputerAndDevice:not(.disabled)', function () {
          // I don't enter here which is fine, but THE DIALOG STILL OPENS.
  });
  </code></pre>