안녕하세요 여러분, jquery에 익숙하지 않습니다. 실제로는 그렇지 않습니다.jquery 데이터 테이블 순서
이전 프로젝트에서 jquery dataTable 플러그인을 사용했던이 프로젝트를 상속했습니다.
그는 단지이 순서를 desc로 바꾸고 싶습니다.
그는 테이블에 클래스 fullwidth datatable을주는 것 외에도 테이블을 어디에서 초기화할지 모릅니다.
나는이 시도하고 난 올바른 순서를 얻을뿐만 아니라 오류 제공 :
DataTables warning: Cannot reinitialise DataTable.
To retrieve the DataTables object for this table, please pass either no arguments to the dataTable() function, or set bRetrieve to true. Alternatively, to destory the old table and create a new one, set bDestroy to true (note that a lot of changes to the configuration can be made through the API which is usually much faster).
보기
<script type="text/javascript">
$(document).re
ady(function() {
$('.fullwidth').dataTable({
"aaSorting": [[0, 'desc']]
});
});
</script>
<table cellpadding="0" cellspacing="0" class="fullwidth datatable">
<thead>
<tr>
나는 그것이 두 번째로 해당 데이터 테이블을 initialite하려고 생각을 문제 야.
누구든지이 문제를 해결하는 방법을 알고 있습니다.
도움이 될 것입니다. 감사합니다. .
답장을 보내 주셔서 감사합니다. 첫 번째 해결 방법에 집중하고 싶습니다.이 테이블은 전체 페이지에서 사용되기 때문에 가능한 경우이 값을 변경하십시오. 클래스를 제거하려했으나 형식이 지정된 테이블을 얻지 못했습니다. 그가 어디에서 모든 datatable 클래스를 초기화하는 javascript 파일을 찾았지만, 어떻게 그가 fullwidth datatable을 찾을 수 없습니까? 나는 숭고한 CTRL-SHIFT-F와 운이없는 전체 앱을 조사했다. – HateCamel
전체 너비를 보려면 페이지의 CSS를 확인하십시오. 거의 100 % 너비를주는 CSS 선언이있을 것입니다. – charmeleon