title: How to change bootstrap modal size from a link attribute with jquery?
body: <p>I wonder if it's possible to change the bootstrap modal size by reading an attribute from a link. For example, bootstrap modal will change from a normal size into a larger size when an attribute is declared.</p>
  
  <p><code>&lt;a  data-toggle="modal" data-target="#xModal" modal-size="large"&gt;xModal&lt;/a&gt;</code></p>
  
  <p>So the jquery will listen for a click and fire up the modal like</p>
  
  <pre><code>        if($('a[attr='modal-size']') === "large"){
              $('#xModal').modal('show'); 
              $(".modal-dialog").html("modal-lg");
            }
  </code></pre>
  
  <p>Can I succeed the code by this idea?</p>