2013-07-04 4 views
1

나는 dataTables 플러그인을 사용하고 기반으로 aaSorting를 지정하고, 나는 인덱스하여 클래스 이름 열의 및하지 않음으로써 초기 정렬을 제어하려는.어떻게 번째 수준의

나는이 솔루션을 찾았습니다 : table이 같은 페이지에 있기 때문에 http://live.datatables.net/awunaw/edit#javascript,html하지만 작동하지 않습니다.

편집 :

<table class="dataTables" > 
    <thead> 
     <th>Num</th> 
     <th class="defaultSort">Date</th> 
    </thead> 
    <tbody> 
     <tr> 
     <td>11</td> <td>1/1/13</td> 
     </tr> 
    </tbody> 
</table> 


<table class="dataTables" > 
    <thead> 
     <th class="defaultSort">Num</th> 
     <th>Date</th> 
    </thead> 
    <tbody> 
     <tr> 
      <td>11</td> <td>1/1/13</td> 
     </tr> 
    <tbody> 
</table> 

jQuery('table.dataTable').dataTable(dataTablesDefaultOption); 
+0

는 왜 같은 페이지에 배수 테이블 작동하지 않습니다

jQuery("th.dateSort").click(); 
? 어떤 문제도 있어서는 안됩니다. – davidkonrad

+0

는 HTML/스크립트를 보여줍니다! – davidkonrad

+0

나는'$ ('table.dataTables th.defaultSort')를 사용할 수없는 인덱스를 ('일 table.dataTables');'나는 두'table.dataTables' – Ouadie

답변

관련 문제