Set modal title
<p>I have my modal:</p>

<pre><code>&lt;div id="defaultModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="modal-title" aria-hidden="true"&gt;
    &lt;div class="modal-dialog"&gt;
        &lt;div class="modal-content"&gt;
            &lt;div class="modal-header"&gt;
                &lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;&amp;times;&lt;/button&gt;
                &lt;h3 class="modal-title" id="modal-title"&gt;Modal Title&lt;/h3&gt;
            &lt;/div&gt;
            &lt;div class="modal-body" data-table="table" data-id=""&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>I have my button:</p>

<pre><code>&lt;button  href="page.php" data-title="New Data" class='call-modal btn btn-success' &gt; 
    &lt;i class="glyphicon glyphicon-plus"&gt;&lt;/i&gt;
&lt;/button&gt;   
</code></pre>

<p>And after click the button I use the class "call-modal":</p>

<pre><code>$('.call-modal').on('click', function(e){
    e.preventDefault();
    $('#defaultModal')
    .find('.modal-header &gt; h3').text("Teste").end()            
    .find('.modal-body').load($(this).attr('href')).end()            
    .modal('show');
});
</code></pre>

<p>I can load the content but I would like to set the Title using the data-title.</p>

<p>Any idea why it is not working? </p>

<p>Thank you</p>