I have an ajax loaded content where i want to use a php script.
The problem is that the script doesn’t work and if i try to .load it inside the ajax loaded content it gives an error stating "$ is not defined".
Is there a way to load a php script inside a dinamically loaded content?
Thanks
edit: i solved the $ is not defiend thing.
ok, some clarifiations.
These are the steps:
INDEX->menu click->ajax loads html into a div inside INDEX->inside that html i put a .load that should load the output of a php script.
Unfortunately it doesn’t work.
edit2: i was just stupid, the php script did load just well, the problem was i missed a character in the password for the db and it didn’t load the content. Thanks
means the jquery library is not loaded check that
you have provided the correct path to the jQuery.js file, also include the jquery before including any other
jslibrarytry using a cdn hosted version of jquery
EDIT
when you bind events to the dynamically loaded elements you have to use
.on(jquery 1.7+) or.delegatelike