title: content editable cursor position
body: <p>I have a div thats content editable and I wish to click on the edit button and the cursor appears at the start of the div, at the minute it appears at the end. </p>
  
  <pre><code>&lt;li style="display: list-item;" class="menu-item" contenteditable="true"&gt;
  &lt;div class=""&gt;Dior&lt;input type="checkbox" name="selected"&gt;&lt;/div&gt;
  &lt;ol class=""&gt;
      &lt;li style="display: list-item;" class="menu-item"&gt;
      &lt;div class=""&gt;&lt;a href="/portfolios/charlize-theron" class="" name=""&gt;Charlize-Theron&lt;/a&gt;
      &lt;input type="checkbox" name="selected"&gt;&lt;/div&gt;
      &lt;/li&gt;
      &lt;li style="display: list-item;" class="menu-item"&gt;
      &lt;div class=""&gt;&lt;a href="/portfolios/natalie-portman" class="" name=""&gt;Natalie-Portman&lt;/a&gt;
      &lt;input type="checkbox" name="selected"&gt;&lt;/div&gt;
      &lt;/li&gt;
      &lt;li style="display: list-item;" class=""&gt;
      &lt;div class=""&gt;&lt;a href="/portfolios/sharon-stone-1" class="" name=""&gt;Sharon-Stone&lt;/a&gt;
      &lt;input type="checkbox" name="selected"&gt;&lt;/div&gt;
      &lt;/li&gt;
  &lt;/ol&gt;
  &lt;a href="#" class="edit" style="opacity: 1; "&gt;Edit&lt;/a&gt;&lt;/li&gt;
  </code></pre>
  
  <p>So when you click on edit at the  minute, you have to arrow key back to the start to edit the Dior (which is the only thing that really get's edited). but i've tried to add the content editable code to the div only and it doesn't work.</p>
  
  <p>Here's some of my jQuery</p>
  
  <pre><code>$(".edit").click(function(){
              $(this).parent().children("div").focus(function(){
  
              });
          });
  
          $(".edit").hover(function(){
              $(this).css("opacity","0.5")
          }, function(){
              $(this).css("opacity","1")
          });
  
          $(".edit").parent().blur(function(){
              var sortableList = $(".sortable").html();
              $("#ItemDescription").val(sortableList);
          });
  
  function storeUserScribble(id) {
                  var scribble = $("li div").text();
                  localStorage.setItem('userScribble',scribble);
                }
  
                function getUserScribble() {
                  if ( localStorage.getItem('userScribble')) {
                    var scribble = localStorage.getItem('userScribble');
                  }
                  else {
                  }
                }
  
                function clearLocal() {
                  clear: localStorage.clear();
                  return false;
                }
  </code></pre>
  
  <p>If someone can shed some light on why the cursor isn't at the front of the div automatically that could help. I would love to set the cursor position to the start IE Before DIOR. </p>
  
  <p>Thanks for the help! </p>