January 25th, 2013, 04:46 PM
Jquery function with Ajax
I was trying this:
In a content I load with Ajax xmlhttprequest. The request only works in the home page, but not in the loaded content.
Any idea how come?
Thx. kr, C.
January 25th, 2013, 11:20 PM
I think it's because the <p> tag element(s), that may be in your responseText (from your AJAX request); was not loaded in the DOM (basically when the parent document onload event occurred and I would assume; that the jQuery function is in your parent document). So you are only able to access the DOM onclick event of the <p> tag element(s); that are in your parent document; where (I am assuming)... your jQuery function resides. Now I maybe wrong; but this is my hypothesis.
January 27th, 2013, 10:23 AM
I solved it using the eval function.
Originally Posted by web_loone08