On Mon, Dec 14, 2009 at 8:30 AM, Alex <alex.ben...@gmail.com> wrote: > // Try the jQuery way > $('textarea').each ( function() { > console.log("each="+$(this)); > id_string="eta_"+text_id; > $(this).attr({ emacs_chrome_id: id_string }); > $(this).after('<a > href="javascript:editTextArea(\''+id_string+'\')">'+editImgTag+'</ > a>'); > text_id++; > } )
Things are easier if you use the DOM rather than concatenating HTML. If you create an <a> node, then you can add a click listener to it that will run in the content script context. Sorry, I am not a jQuery whiz, but someone else will probably chime in who knows the details. - a -- You received this message because you are subscribed to the Google Groups "Chromium-extensions" group. To post to this group, send email to chromium-extensi...@googlegroups.com. To unsubscribe from this group, send email to chromium-extensions+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/chromium-extensions?hl=en.