Skip to content

Instantly share code, notes, and snippets.

@burke
Created May 6, 2009 20:34
Show Gist options
  • Save burke/107725 to your computer and use it in GitHub Desktop.
Save burke/107725 to your computer and use it in GitHub Desktop.
$(document).ready(function(){
$('.rotated').each(function(){
var text = $("p", $(this)).html();
$(this).html("");
var size = text.length;
var pixels = Math.round(size * 8);
$(this).css('height',pixels);
var R = Raphael($(this).get(0), 30, pixels);
var attr = {"font": '13px "Helvetica"'};
var txt = R.text(15, Math.round(pixels/2.0), text).attr(attr).attr("fill", "#fff");
txt.rotate(270);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment