Witam, próbuję uruchomić skrypt obracający tekst w komórce o 90 stopni z strony :
Rotate table cell content i nie udaje mi się... Czy mógł by ktoś pokazać mi jak to ma wyglądać na przykładzie jednej komórki w tabeli aby tekst był obrócony?
style_text.css
/* Styles for rotateTableCellContent plugin*/
table div.rotated {
-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
writing-mode:tb-rl;
white-space: nowrap;
}
thead th {
vertical-align: top;
}
table .vertical {
white-space: nowrap;
}
test.php
<link rel="stylesheet" type="text/css" href="style_text.css"> (function ($) {
$.fn.rotateTableCellContent = function (options) {
/*
Version 1.0
7/2011
Written by David Votrubec (davidjs.com) and
Michal Tehnik (@Mictech) for ST-Software.com
*/
var cssClass = ((options) ? options.className : false) || "vertical";
var cellsToRotate = $('.' + cssClass, this);
var betterCells = [];
cellsToRotate.each(function () {
var cell = $(this)
, newText = cell.text()
, height = cell.height()
, width = cell.width()
, newDiv = $('
<div>', { height: width, width: height })
, newInnerDiv = $('
<div>', { text: newText, 'class': 'rotated' });
newDiv.append(newInnerDiv);
betterCells.push(newDiv);
});
cellsToRotate.each(function (i) {
$(this).html(betterCells[i]);
});
};
})(jQuery);
$('.dupa2')
.rotateTableCellContent({className: 'dupa'});
Z góry dzięki za pomoc
Wicek