Example: I have file ajax demo_ajax.php will return:
<p>this is data in file ajax</p>
<script>
demo();
</script>
And file script demo_script.js :
$(document).ready(function(){
function demo(){
// my code here
}
});
My question is how to in file demo_ajax.php can call function demo() in file demo_script.js, I will try and get error function undefined