Insert DIV on click.

Insert DIV on click.

I have a CSS element defined as

#map_canvas {

    margin-left: auto;

    margin-right: auto;

    width: 600px;

    height: 600px;

    border: #00882D 3px solid;

}

And on a click I would like to insert it into and DIV with an ID of current text.  I thought I could insert it with the following code based on a click function.

 

    $('#gMapLinks').click(function(){

        $('<div id="#map_canvas">').appendTo('#currentText');

    });

That does not seem to work although I don’t see any errors and it traces clean in Firebug.  Can someone point me to a tutorial to show me how to do that?

Thanks