I’m trying to have something like the title of a page generated through PHP. What I have are a few pictures with a title (like Gallery, About, Home, etc.) that get animated onto the page via JQuery. I was wondering if it’s possible to determine what picture is animated by looking at the tag. For example, if the title tag reads “Gallery (1-20)”, the picture displayed has the text “Gallery” written on it.
I have the picture of the title set as the background of a span that is originally hidden from view.
<ul>
<li><span class="Title" id="AboutTitle"></span></li>
</ul>
When the page loads, this JQuery runs.
<script type="text/javascript">$(function() {$(".Title").stop(true, true).animate({width: 'show'}, 1000);})</script>
I’m wondering if it’s possible to do something like this:
<title>Gallery: Pictures 1-20</title>
<ul>
<li><span class="Title" id="*title tag*Title"></span></li>
</ul>
where the PHP looks for the first word in the title and inserts it where the asterisks (*) are.
You could have a hidden form on the page, and when the jquery animates, have it set a value of an input name in the form to whatever’s animating. Then, you could have a hidden iframe which posts the form values to PHP to be processed.
in the main page have an iframe
in the iframe have a page with:
then from query have it set the value of animatedItem to whatever’s being animated and submit the form. As it’s all happening in the iframe, it has no effect on the user experience on the current page.