title: Help with creating a random placement of text
body: <p>I want the the text to randomly appear left, center, or right within the text box.</p>
  
  <p>Here is the test page: www.creativewritingstudio.com/Home_2.html</p>
  
  <p>Below is the script I am using:</p>
  
  <pre><code>&lt;font face="helvetica" color="1b1b1b" size="5px" repeat&gt;
  
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
  &lt;title&gt;Random Text w/ jQuery&lt;/title&gt;
  &lt;style type="text/css"&gt;
  #text-box {
  
   padding: 4px;
   width: 602px;
  }
  #text-content {
   color: #1b1b1b;
   text-align : center;
  
  }
  #text-reload {
  
   display: block;
   margin-top: 4px;
   text-align: right;
   outline: none;
  }
  &lt;/style&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;div id="text-box"&gt;
   &lt;div id="text-content"&gt;&lt;/div&gt; &lt;!-- random text goes in ther --&gt;
  
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
   $(document).ready( function() {
    var textArray = [
     'Flow',
     'Precision',
     'Voice',
     'Imagery',
     'Pace',
     'Unity',
     'Word Choice',
     'Rhythm',
     'Inspiration',
     'Balance',
     'Clarity',
     'Simplicity',
     'Revision',
     'Discipline',
     'Fundamentals',
     'Dedication',
     'Practice',
    ];
    $('#text-content').loadText( textArray, 5500 ); // ( array, interval )
   });
   // custom jquery plugin loadText()
   $.fn.loadText = function( textArray, interval ) {
    return this.each( function() {
     var obj = $(this);
     obj.fadeOut( 'slow', function() { 
      obj.empty().html( random_array( textArray ) ); 
      obj.fadeIn( 'slow' );
     });
     timeOut = setTimeout( function(){ obj.loadText( textArray, interval )}, interval );
     // reload random text (if not animated) -- entirely optional, can be removed, along     with the reload link above (&lt;a href="javascript:;" id="text-reload"&gt;&lt;em&gt;randomize&lt;/em&gt;&lt;/a&gt;)
     $("#text-reload").click( function(){ 
      if( !obj.is(':animated') ) { clearTimeout( timeOut ); obj.loadText( textArray,     interval );} // animation check prevents "too much recursion" error in jQuery 
     });
    });
   }
   //public function
   function random_array( aArray ) {
    var rand = Math.floor( Math.random() * aArray.length + aArray.length );
    var randArray = aArray[ rand - aArray.length ];
    return randArray;
   }
  &lt;/script&gt;
  &lt;/html&gt;
  </code></pre>
  
  <hr>
  
  <p>Many thanks!</p>