Hey there, I could really use some help with a little issue.
I've been trying to use the click() and load() functions to bring my content into a specific CSS class.
$("#feed").click(function(){
$(".homefeed").load("feedcontainer.php");
$("#elementcontainer").show();
});
$("#news").click(function(){
$(".homefeed").load("n.php");
$("#elementcontainer").show();
});
$("#info").click(function(){
$(".homefeed").load("newinfo.php");
$("#elementcontainer").hide();
});
So basically, whenever I click on a div, it loads the content from a PHP file into the .homefeed container as intended.
The only thing is, I'd like to add a loading image or animation while the content is being loaded, just to keep users engaged. Because sometimes it takes a bit of time to load, you know?
Any ideas on how I can make this happen? Much appreciated!