i have a input[type=text]
containing the short url for a post. i want to select the short url so users can easily copy the short url into clipboard. i used
$(".shorturl input").focus(function() {
this.select();
});
but i noticed the 1st time it works fine then the next time it will blick (i see the text selected then deselected). it seems when like it try to select a selected text and ends up deselecting?
then to enhance this, how can i copy text to the clipboard? hopefully without flash? i see jQuery plugins to copy text but they use flash.
my site using that is http://jiewmeng.tumblr.com