2017-01-07 1 views
2

우수한 "footable"플러그인을 사용합니다. 헤더를 클릭하여 테이블을 정렬 할 수 있지만 "footable"을 지정하는 방법 : 페이지가로드 된 직후이 열을 사용하여이 테이블을 정렬합니까?footable, 페이지를로드 한 후 "정렬 된"아이콘을 표시하는 방법은 무엇입니까?

나는이 키워드와 함께 시도 :데이터 정렬 초기, 성공하지 :

enter image description here

와 : 내 목표는 바로로드 한 후이 테이블을 가지고있다

<thead> 
        <tr> 
         <th data-type="html" data-sort-use="text" data-sort-initial="ascending">Code</th> 
         <th>Libellé</th> 

        </tr> 
       </thead> 

헤더에 표시된 "정렬 된 아이콘". 그렇게하는 방법 ?

내 JS는 간단하다 : 당신의 아이디어에 대한

$(function() { 
    $('.footable').footable(); 
}); 

감사합니다. Merci

도미니크

답변

2

답을 찾았습니다.

<th data-type="html" data-sort-use="text" data-sorted="true" data-direction="ASC">Code</th> 
0

당신은 칼럼에 태그를 추가해야합니다 : 데이터 분류이 같은

= "true"로 :

<th data-type="html" data-sort-use="text" data-sort-initial="ascending" data-sorted="true">Code</th> 
관련 문제