Skip to content

Instantly share code, notes, and snippets.

@krisk
Created December 23, 2011 15:41
Show Gist options
  • Save krisk/1514491 to your computer and use it in GitHub Desktop.
Save krisk/1514491 to your computer and use it in GitHub Desktop.
Centering text for Textualizer.js
<!DOCTYPE html>
<html>
<head>
<title>Textualizer example</title>
<script src="http://code.jquery.com/jquery.min.js"></script>
<script src="textualizer.js"></script>
<style type="text/css">
#container
{
height: 100%;
width: 100%;
margin: 0 auto;
/*text-align: center;*/
}
#txtlzr
{
font-size: 40px;
width: 700px;
margin: 0 auto;
border: 1px solid red;
font-size: 40px;
height: 700px;
}
</style>
</head>
<body>
<div id="container">
<div id="txtlzr">
</div>
</div>
</body>
<script type="text/javascript">
$(function() {
var list = ['Textualizer is a jQuery plug-in that allows you to transition through blurbs of text. '
,'When transitioning to a new blurb, any character that is common to the next blurb is kept on the screen, and moved to its new position.'
, 'Textualize: verb - to put into text, set down as concrete and unchanging. Use Textualizer to transition through blurbs of text.'
, 'Blurb: noun - a short summary or some words of praise accompanying a creative work. A promotional description.'];
var txt = $('#txtlzr');
txt.textualizer(list, { centered: true });
txt.textualizer('start');
})
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment