Fotiman - 6:09 pm on May 1, 2012 (gmt 0)
Not sure I understand what you mean. Did you have something like this?
In other words, is the source of the text that you're copying to change-div nested within change-div to begin with? If so, that would cause a problem because after the first call, the source would no longer exist. In other words, after the first call, your DOM would become:
Therefore, subsequent button clicks would result in this:
var htmlStr = ( "#text2" ).html();
// htmlStr = null because #text2 no longer exists in the DOM