title: Error: select() is not a function - JQuery
body: <p>I trying to copy to clipboard the values inside the input fields. The code to get these values is working fine, when I click on the button for "copy", with the alert() function as little debug, I can see the right value inside... but when I try to take this value to copy to clipboard, an error comes up.
  I have seen a lot of example around the web, but only for an element...
  So, this is my code that shows the right value, but not works for a copy.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(document).ready(function() {
    $('div#screen_wrap').each(function() {
      var elem = $(this);
      $("#copycoords", elem).click(function() {
        var coords = $("#coords", elem).val();
        coords.select(); // This line is the error
        document.execCommand("copy", false);
        alert(coords);
      });
    });
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.3/jquery.min.js"&gt;&lt;/script&gt;
  
  &lt;div id="screen_wrap" class="glass"&gt;
    &lt;div&gt;&lt;img src="img.jpg" /&gt;&lt;/div&gt;
    &lt;p&gt;Country 1&lt;/p&gt;
    &lt;input type="text" value="47.529016,19.050963" id="coords" /&gt;
    &lt;input type="button" value="Copia" id="copycoords" class="btn1" /&gt;
  &lt;/div&gt;
  
  &lt;div id="screen_wrap" class="glass"&gt;
    &lt;div&gt;&lt;img src="img.jpg" /&gt;&lt;/div&gt;
    &lt;p&gt;Country 2&lt;/p&gt;
    &lt;input type="text" value="41.662055,-0.894292" id="coords" /&gt;
    &lt;input type="button" value="Copia" id="copycoords" class="btn1" /&gt;
  &lt;/div&gt;
  
  &lt;div id="screen_wrap" class="glass"&gt;
    &lt;div&gt;&lt;img src="img.jpg" /&gt;&lt;/div&gt;
    &lt;p&gt;Country 3&lt;/p&gt;
    &lt;input type="text" value="38.461808,27.217074" id="coords" /&gt;
    &lt;input type="button" value="Copia" id="copycoords" class="btn1" /&gt;</code></pre>
  </div>
  </div>
  </p>