I'm trying to change content in a div depending on a href-clicking. I'm a newbie at freeform scritpting so please be gentle on me.
So, I have this index.html with a
index.html loads the menu 'alacarte.html' in div id: 'result' by default.
I really want the links to be placed graphically on top of the say 'pizza.html'-page.
$("#alacarte").click(function(){
$('#result').load('alacarte.html');
$("#beverage").click(function(){
$('#result').load('pizza.html');
$("#beverage").click(function(){
$('#result').load('beverage.html');
$( '#result' ).load( 'alacarte.html' );
And in the menu page 'alacarte.html'
$("#alacarte").click(function(){
$('index.html#result').load('alacarte.html');
$("#beverage").click(function(){
$('index.html#result').load('beverage.html');
$('index.html#result').load('pizza.html');
I hope you can follow my futile explanation. How should I do it?