page loaded for the second time you have problems with html()

page loaded for the second time you have problems with html()

When I load in a second time the same page, $ (div). html () does not work.
  Example:


  • index -> page1 (at this point when make a change to a modified textarea a counter that in a div)
  • page1 -> page2
  • page2-> page1 (test with alert () and the value is correct, but ignore the $ (div). html ())


My solution, By rudimentary way, the page2 is load with location = 'url' onclick.

Ugly but it works

Someone give me some help?