I have WordPress site and want to print the share embed code at the bottom of the post like on this website http://www.expansys.com/infographics/facebook-v-tv/
Someone told me I can use something like
$(".theclass").focus(function(){
this.select();
})
Unfortunately I don’t know where to start and was hoping for some pointers. I couldn’t find any plugins to do this either.
Assuming the poster just wanted to be able to select all the text inside of the textarea when it’s clicked (like in the example website he gave), then if you look at the html source on the page, you’ll see that they don’t use a jQuery solution, they just call
Here’s a jsFiddle showing that this will work (at least in all the most up-to-date versions of IE9, Firefox 5, Chrome 12, Opera, and Safari), http://jsfiddle.net/QpfAj/.