title: Maintain Text Selection When Using DIV as a button
body: <p>Maybe this is a browser related issue?  I'm on Chrome at the moment...</p>
  
  <p>What I'm trying to accomplish is allow the user to save text that they've selected (highlighted) on the page with their cursor.</p>
  
  <p>I've got the javascript/jQuery/ajax all setup...and it works like a charm when I'm testing it via the console.</p>
  
  <p>i.e. - I select some text and then run this command.</p>
  
  <pre><code>alert(getSelected());
  </code></pre>
  
  <p>To which I get an alert popup with the selected characters.
  ...so it works in theory.</p>
  
  <p>HOWEVER - When I want to use a button to make the call, what's happening is that the text selection dissapears FIRST, and thus I am unable to then see/save what they've selected.</p>
  
  <pre><code>&lt;script&gt;
  $('#save').click(function(){
    var selected_text = getSelected();
  });
  &lt;/script&gt;
  
  &lt;div id="save"&gt;&lt;img src="the_save_button.jpg" height="50" width="50" /&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Is there a way to maintain the text selection upon clicking/after clicking the "save" DIV?</p>
  
  <p>Open to any and all solutions!! Thanks!</p>