Say I have this txt file, and inside it is:
title(Here is the title that gets inserted into the title element) body(Here is the body text that gets inserted into the body element)
and I want jquery to insert the title into the title element and the body into the body element. Is this possible, or do I need to use separate txt files for each content? I am new to jquery so this isn't very obvious to me.
I have this code so far:
$(function(){
$( "#title" ).load( "content/home.txt" );
$( "#body" ).load( "content/home.txt" );
});
If this was difficult to understand I hope this code would better explain it.