Hi guys, I spent the whole day (thats 8 hours straight) trying to get a simple jQuery function to work but failed miserably!!! I very very new to the jQ scene and I know I have a lot of catching up to do!
Could somebody get this to work for me ???
All i want is when user clicks is:
1.the box with info fades out
2. when data returned from the database the box fades in with the new data!
What happens now is while the box fading out i can see new set of data already loaded and thats a complete FAIL of what I interned to do. ANY HELP IS GREATLY APPRECIATED! Peace.
$(document).ready(function() {
$("ul.sc_menu a").click(function()
{
$('#content #mainbg #infobox #trackinfo').animate({opacity:"0"});
$.post('projects-agent.php', {'title': $(this).text()}, function(data)
{
$('#content #mainbg #infobox #trackinfo').html(data);
$('#content #mainbg #infobox #trackinfo').animate({opacity:"1"});
});
return false;
});
});