[jQuery] problems with ajax query
dear list,
i wrote a small site which changes content with ajax within a div.
everything is working fine on my local machine. but when i upload it
on my webspace ajax isn´t working anymore. i thought maybe its a
naming problem (because: local windows; web linux case sensitiv).
but i can´t find any error. may be someone has a clue what going
wrong?
this is the div with my "menu buttons":
===============================================
<div id="navi">MENU<br />
- <a id="about-nav" href="#">about</a><br />
- <a id="program-nav" href="#">programm</a><br />
- <a id="anmeldung-nav" href="#">register</a><br/>
</div>
an the div which handles the content:
===============================================
<div id="about"></div>
jquery seems to work correct because the fadein´s work!!!
here my js function:
===============================================
$(document).ready(function(){
// fade in at start
$("#kwg").fadeIn("slow");
$("#navi").fadeIn("slow");
// ajax funktions to change content
$('#about-nav').click(function(){
change('about.html');
});
$('#program-nav').click(function(){
change('programm.html');
});
$('#anmeldung-nav').click(function(){
change('anmeldung.html');
});
function change(loc){
$.ajax({
url: loc,
type: 'POST',
beforeSend: function(){
$('#about').fadeOut(500);
},
success: function( neueDaten ) {
window.setTimeout( function() {
$('#about').html( neueDaten );
},500);
},
complete: function(){
$('#about').fadeIn(500);
}
});
}
});
thanks a lot for your help!,
toni