I need to use javascript or jquery to get a html or php file and put its contents inside a div of the current page.
I know how to do this using ajax but would like to know if there is a simpler way without having to use all the code that ajax uses.
I think you are looking for jQuery's $.load.
$('#div_id').load('url');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With