How to use the PHP “include” function after a javascript code, cause when the animation starts it stops because it has to load the php included page. So I want to “include” the page after the animation is ready. How can I do that?
This is my animation: $( ".izkustvo" ).click(function(){ $('#izkus').show(); $(".izkus").switchClass("izkuz", "tvo", 1500, 'easeInExpo').switchClass( "tvo", "zavur6en", 3000, 'easeOutQuart'); });
here is the button and the PHP codes in my ‘index’ page: <li><a href="index.php?page=izkustvo" class="izkustvo" >izkustvo</a></li>
and if($_GET['page'] == "izkustvo"){ include("pages/karieri.php");
Can you be more specific in your question? What animation exactly?
As @Hosh Sadiq noted, you could try using AJAX (http://api.jquery.com/jQuery.ajax/).
One way to get PHP in after a page already has loaded (without reloading it again):
this snippet could be called when you “animation” is complete.. If this does not answer your question, I suggest you be a little more clear in what you’re trying to accomplish here 🙂