我想從第15個td列中獲取div,並將div的寬度設置爲300px。使用jquery在td中找到div
我有表格摘要來識別表格。如何設置寬度?
<table summary="Copy and Design RFP">
....
...
/* column15*/
<td class="ms-vb2">
<div dir="">1/9/14 - 1st draft sent</div>
</td>
到目前爲止,我寫了
$(document).ready(function() {
if (window.location.href.indexOf("dept/mkt/Lists/Request for Projects/Active Projects.aspx") > -1) {
$('table[summary="Copy and Design RFP"] tr td:nth-child(15)').each(function() {
var id = $(this).find('div'); // This is not working
});
}
});
'$( '表[摘要= 「複製與設計RFP」] TD:EQ(14)的div')寬(300)' – adeneo