I have several pages (including an 'include' php page which contains my menu links. And I also have a footer 'include' php page).
Basically, I thought of having this smooth animation, where my "pouch" as I call it, animates downwards. It's basically a slightly more fancy type of rectangle that has a width of 1000px. So, whenever I click on "Services" for example, it would animate slowly enough downwards.
Aside from the links on my pages, the order of what I currently have goes as follows: I have my scripts externalized, and I have text on each of my pages. So for the "Services" page for example, I have my text, followed by the "pouch". The "pouch" is on my footer 'include' php page.
This is the code I have for the animation. I have a similar code which works on another project which includes more coding. But, I assume this code here is correct. The question is, how can I make it that this code is triggered before loading the other page's text:
$('#services-fr-2').click(function(){
if ( $('#green-pouch-fr').height() == 580 ) {
$('#green-pouch-fr').animate({
'top':'800px',
'height':'500'
})
In other words, even though the text is on the next page, I would need the pouch to animate downwards, followed by the text appearing.