$(function(){
  $('#todoList').append( '<div class="sidebarToDo" .................</div>' );
});

http://docs.jquery.com/DOM/Manipulation#append.28_content_.29

You might like to break the HTML into a string per line and join them
via +. For example:

'<div class="sidebarToDo" width="100%" id="dToDo3">' +
  '<table cellpadding="0" cellspacing="0" border="0" width="100%">' +
    '<tr>' +
      etc...

Karl Rudd

On 2/22/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hi,
>
> If, after the document has fully loaded, I want to append a DIV to the end of 
> another DIV with id = "todoList", what is the easiest way to do that?  The 
> HTML code that I want to append is below ...
>
> <div class="sidebarToDo" width="100%" id="dToDo3">
> <table cellpadding="0" cellspacing="0" border="0" width="100%">
> <tr>
>        <td><input type="checkbox" name="completed"></td>
>        <td class="sidebarText"><input type="text" size="10" name="newItem" 
> id="newItem"></td>
>        <td align="right"><a class="editTDItem" href='#'><img 
> src="images/edit.gif" alt="Edit" border="0"></a></td>
>        <td align="right"><a class="deleteTDItem" href='#'><img 
> src="images/deleteLink.gif" alt="Delete" border="0"></a></td>
> </tr>
> </table>
> </div>
>
> Thanks, - Dave
>
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to