我正在尝试使用jQuery计算文本宽度.我不确定是什么,但我肯定做错了什么.
所以,这是代码:
var c = $('.calltoaction');
var cTxt = c.text();
var cWidth = cTxt.outerWidth();
c.css('width' , cWidth);
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用jQuery dataTable插件.问题是不显示排序图标(此箭头指向哪个方向数据实际排序).
我的代码如下:
$('#example').dataTable(
{
"bPaginate": false,
"bFilter": false,
"oLanguage": { "sInfo": ""}
}
);
Run Code Online (Sandbox Code Playgroud)
和Html:
<table class="surfClass" cellspacing="1" id="example">
<thead>
<tr>
<th width="120px">Name</th>
<th width="120px">The hourly rate (points)</th>
<th>Levels of referrals</th>
<th>bonuses</th>
<th width="70px">Payout minimum</th>
</tr>
</thead>
Run Code Online (Sandbox Code Playgroud)