I am trying to make the text randomly positioned on the screen. How do I do that?
I am using Textillate
<h1 class="tlt1">Go </h1>
You can achieve this either by position:fixed
OR position:absolute
.
$('.tlt').each(function(){
$(this).css({"left": Math.random() * window.outerWidth , "top": Math.random() * window.outerHeight}).textillate();
});
OR
$('h1').each(function(){
$(this).css({"left": Math.random() * window.outerWidth , "top": Math.random() * window.outerHeight}).textillate();
});
Updated jsfiddle