1

Hello,

I'm new to jQuery, and BugMonkey. When in edit mode of a case, I'd like to completely replace (only) the element on the following:

...
   <div title="" class="content">
       <textarea rows="4" id="descriptionD81" tabindex="201" title="" name="P12_descriptionD81"></textarea>
       <input type="hidden" value="|1|" name="P12_descriptionD81_ixBugsToEdit">
   </div>
...

with my own. I've tried things like:

$("div.content #descriptionD81").html("<textarea id=\"descriptionD81\" ....);

but no dice. Can you help me?

Oh, is there a way to distinguish when we're in 'edit' mode?

thanks

flag
1 
Your jQuery is saying to replace the HTML content (i.e. the stuff inside) of the textarea with another textarea; essentially putting a textarea in a textarea. Check out replaceWith (api.jquery.com/replaceWith) – Daniel LeCheminant May 19 2010 at 11:41
Thanks Daniel, it looks like that did it! – Totem May 20 2010 at 2:16

1 Answer

1

Moving Daniel's comment into an answer:

Your jQuery is saying to replace the HTML content (i.e. the stuff inside) of the textarea with another textarea; essentially putting a textarea in a textarea. Check out replaceWith (api.jquery.com/replaceWith)

link|flag

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.