2
var id = $(this).attr("id");
var pagerID = $(this).attr("data-pagerID");
$.tablesorter.customPagerControls({
table : $('#'+id), // point at correct table (string or jQuery object)
pager : $('#'+pagerID), // pager wrapper (string or jQuery object)
pageSize : '.left a', // container for page sizes
currentPage : '.right a', // container for page selectors
ends : 2, // number of pages to show of either end
aroundCurrent : 1, // number of pages surrounding the current page
link : '<a href="#">{page}</a>', // page element; use {page} to include the page number
currentClass : 'current', // current page class name
adjacentSpacer : ' | ', // spacer for page numbers next to each other
distanceSpacer : ' \u2026 ' // spacer for page numbers away from each other (ellipsis …)
});
, http://mottie.github.io/tablesorter/beta-testing/example-pager-custom-controls에서 가져온 위의 코드 (없는 오류가에 던지고있다함수 몇 가지 이유를 들어
:. 파고에서
$.tablesorter.customPagerControls
, 그것은 customPagerControls 나타납니다 JS에 존재하지 않습니다.
당신은 호출기 - 맞춤 controls.js''로드 적이 있습니까? – Barmar
나는 그것을 놓친 수 있습니다. 예제 코드에 나열된 것도 보지 못했습니다. 그러나 페이지 소스에 숨겨져 있습니다. 그러나 문제를 해결하지 못하는 것 같습니다. 정의되지 않은 함수는 아직 없습니다. 호출기 - 사용자 정의 컨트롤이 중요한 부분처럼 – tgamt
보인다. 이 문제에 대한 몇 가지 미묘한 차이가 있습니다. 나는이 문제를 다루기 위해 별도의 질문을 만들었다. http://stackoverflow.com/questions/25805547/appying-a-custom-pager-to-multiple-tables-in-tabs – tgamt