如何让modal()根据返回的内容自动调整宽度?
#bootstrap request
<script type="text/javascript">
$.get('index.php',function(html){
$('body').append(html);
$('#ajaxHtml').modal('show'); #如果让这个ajaxHtml div自动调整宽度?
})
</script>
//index.php
<div id="ajaxHtml">
<table border="1" width=100%>
<tr>
<td>ID</td>
<td>Name</td>
</tr>
</table>
</div>
$('#ajaxHtml').on('show', function() {//捕获show事件
//获取html宽度
//调整modal宽度
})