// Turns a link into a "copy embed code" input box, with code preselected // As seen on flowcoder.com :-) // Works with multiple embed links on the page // // Example link: // Embed // // http://flowcoder.com/24.js # => returns javascript that does document.write(); $(document).ready(function () { $('a.embed_link').click(function () { var self = $(this); self.hide(); var scriptTag = '' var input = $(''); input .val(scriptTag) .appendTo(self.parent()) .focus() .select() .blur(function () { self.show(); input.remove(); }); return false; }); });