title: Producing a string that rotates a letter with each click?
body: <p>My task is to use javascript and jquery to produce a web page that takes a user-submitted string and produces that string as such: <code>abcde</code> => <code>bcdea</code>  my problem is that when I try and run the program there is no output. I check the error console and it says rotate is not define. I'm just very confused.</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;!-- This page demonstrates several string properties and operations --&gt;
  &lt;!-- =============================================================== --&gt; 
  
  &lt;html&gt;
  &lt;head&gt;  
    &lt;title&gt; String Demo &lt;/title&gt; 
    &lt;script  src="..111/js/jquery-1.9.1.min.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript"&gt;
      function rotate(s)
      {
        result = $('#strBox').value;              
        "rotate:" + result
        var result = "";
        for (var i = 0; i&lt; s.length; ++i){
          result = s.substring(1) + s.charAt(0);
          $('#outputDiv').innerHTML = 
        }
      }
    &lt;/script&gt;
    &lt;/script&gt;
  &lt;/head&gt; 
  
  &lt;body&gt; 
    &lt;h2&gt;String Demo&lt;/h2&gt;  
    &lt;p&gt;
      Enter a string: &lt;input type="text" id="strBox" size=20 value=""&gt;
    &lt;/p&gt;
    &lt;input type="button" value="Click to Process" onclick="rotate();"&gt;                   
    &lt;hr&gt;
    &lt;div id="outputDiv"&gt;&lt;/div&gt; 
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>