Libre wiki official (토론 | 기여) 편집 요약 없음 |
Libre wiki official (토론 | 기여) 편집 요약 없음 |
||
(같은 사용자의 중간 판 하나는 보이지 않습니다) | |||
1번째 줄: | 1번째 줄: | ||
$( | $(document).ready(function() { | ||
$('.libre-responsive-table').each(function() { | $('.libre-responsive-table').each(function() { | ||
var $table = $(this); | var $table = $(this); |
2019년 10월 8일 (화) 21:47 기준 최신판
$(document).ready(function() {
$('.libre-responsive-table').each(function() {
var $table = $(this);
var $cells = $table.find('tbody th, tbody td');
var $heads = $table.find('thead th');
var cellsPerRow = $heads.length;
$heads.each(function(headIndex) {
var text = $(this).text();
$cells
.filter(function(cellIndex) {
return cellIndex % cellsPerRow === headIndex;
})
.attr('data-th', text);
});
});
});