I'm learning jQuery, I wrote the following script here: http://jsfiddle.net/hspouwnx/14/ The bottom line is that you need to get the text from a div with the message class, if this div is in the document directly then there is no problem I get this data like this var text = $(".message").text(); but if the data arrived from AJAX or were created dynamically, this method does not select them.
I ask for help and solutions to this problem.