E
Eduardo
Hi,
I wrote the following piece of code so that (a) when I click on a
paragraph, (b) it's content is copied, (c) the paragraph is replaced
with a text area and (d) the content from the former paragraph is
inserted into the new text area:
$(document).ready(function() {
$('p').click(function() {
var content = $(this).html();
$(this).replaceWith($('textarea'));
$('textarea').html(content);
});
});
Well, it's not working on Firefox 8.0. Any suggestions?
Thanks,
Eduardo
P.S.: Yes, I intend to put together something similar to Jeditable
(http://www.appelsiini.net/projects/jeditable) but for local editing
only, without sending edited elements to a server.
I wrote the following piece of code so that (a) when I click on a
paragraph, (b) it's content is copied, (c) the paragraph is replaced
with a text area and (d) the content from the former paragraph is
inserted into the new text area:
$(document).ready(function() {
$('p').click(function() {
var content = $(this).html();
$(this).replaceWith($('textarea'));
$('textarea').html(content);
});
});
Well, it's not working on Firefox 8.0. Any suggestions?
Thanks,
Eduardo
P.S.: Yes, I intend to put together something similar to Jeditable
(http://www.appelsiini.net/projects/jeditable) but for local editing
only, without sending edited elements to a server.