I am trying to select all the text with a <code>
or HTML element. I have tried a lot of things but I think that jQuery .select() only works for input boxes.
jQuery('code').click(function () {
jQuery(this).select(); // text should now be highlighted in the browser
});
My HTML
<code>.alpha{}</code>
<code>Some other code element on the page.</code>
<blockquote>A famous quote</blockquote>
It should select and highlight the text