[stackoverflow] cufon magic preview

3937187/cufon-and-jquery-magic-preview

by danmana

HTML

<script src="http://cufon.shoqolate.com/js/cufon.js"></script>
<script src="http://cufon.shoqolate.com/fonts/Vegur.font.js"></script>
<h1>Cufon Test</h1>
<input id="in" type="text">
<div id="out"><h1>Start typing ...</h1></div>

JavaScript

Cufon.replace('h1');
$('#in').keyup(function(){
    $('#out').html('<h1>'+$(this).val()+'</h1>');
    Cufon.replace('#out h1');
});