I create my Html elements using java script createElement()
.But I cannot select any of the html elements in JQuery -- $("p").on("click",function(){})
. It works for $(document)
though. My JQuery script is at the end of the body in the html page. But when inspect elements is checked in the browser after page creation html elements are below the scripts.
I have seen there many other similar questions but none of them worked. Please help me solve this I have been working on this for couple of days now and its taking me no where.