我在使用DataTables时遇到了问题.当我为最后一列添加colspan时,数据表插件不会应用于表.如果我删除最后一个的colspan并将其放到任何其他列,它的工作原理.
例如 -
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="stu_data_table">
<thead>
<tr>
<th> </th>
<th colspan="2"> </th>
<th colspan="2"> </th>
</tr>
</thead>
<tbody>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
$('#stu_data_table').dataTable({
});
Run Code Online (Sandbox Code Playgroud)
对此有何解决方案?
我正在使用ng-bootstrap模式弹出窗口,并且单击十字按钮时没有关闭.
这是<a>触发弹出窗口的标记 -
<div class="actions padding-zero">
<a href="javascript:void(0);" (click)="openFilter()" class="icon configure-columns-icon">
<span class="control-label">Configure Columns</span>
</a>
</div>
Run Code Online (Sandbox Code Playgroud)
莫代尔 -
<ng-template #filterForm let-modal>
<div class="TitlePanel">
Configure Columns
<button type="button" class="close" aria-label="Close" (click)="modal.dismiss('Cross click')">
X
</button>
</div>
<div class="modal-body">
Body
</div>
</ng-template>
Run Code Online (Sandbox Code Playgroud)
component.ts文件 -
export class NgbdModalContent {
@Input() name;
constructor(public activeModal: NgbActiveModal) { }
}
@Component({
selector: 'app-modals',
templateUrl: './modals.component.html',
styleUrls: ['./modals.component.scss'],
encapsulation: ViewEncapsulation.None,
})
export class ModalsComponent {
closeResult: string;
constructor(private modalService: NgbModal) { }
// Open default modal …Run Code Online (Sandbox Code Playgroud) 伙计们,我是 jQuery 的新手。我必须使表格中的子行在单击父行中的链接时隐藏和显示。我试过使用 jQuery 切换,但我不知道当有多行时如何使它工作。
这是桌子——
<table class="table table-striped reportTable">
<thead>
<tr>
<th>Product Type</th>
<th>Product Name</th>
<th>Face Value</th>
<th>My Stock</th>
<th>Ordered Stock</th>
<th>Sub Account Stock</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="showhr" href="#">SIM</a></td>
<td></td>
<td></td>
<td>574,888</td>
<td>0</td>
<td>0</td>
</tr>
<tr class="aser"> <!--child row-->
<td></td>
<td>EPin £5</td>
<td>£05</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="aser"> <!--child row-->
<td></td>
<td>EPin £10</td>
<td>£15</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td><a class="showhr" href="#">SIM</a></td>
<td></td>
<td></td>
<td>574,888</td>
<td>0</td>
<td>0</td>
</tr>
<tr class="aser"> <!--child row-->
<td></td>
<td>EPin £5</td>
<td>£05</td> …Run Code Online (Sandbox Code Playgroud)