I am trying to create dynamic content using append and appendTo functions. It seems to work fine and I can see the new elements on the fly using a Button to execute a customized function based on this jquery methods. something like this:
$('<div id="page-contents2"></div>')
$('<form class="cmxform" id="form1" method="get" action=""></form>')
.prepend('<div>TITLE HERE</div>')
.append('<h3>Page Contents</h3>')
.append('<input type="text" id="n2" name="n2" value="write here" onclick="cleanDefault(this);"/>')
.append('<input type="submit" value="enviar"/>')
.appendTo('body');
the problem is that when i refresh the page the new content dissapear of the DOM. Any help would be apreciated