Hi, I'm trying to integrate a photo gallery into a site where the content section of the page is loaded using AJAX. I'm using Lightbox for the gallery and although the gallery works fine as a separate page, I now need to add the following events to the <div> containing the gallery:
Does anyone know how I can add these to the <div> whenever it is loaded?
Currently the code is as follows on the top page:
the placeholder div....
and the loaded gallery...
Grateful for any help!
Code:
onload="focus_first_input(); initLightbox();"
Currently the code is as follows on the top page:
Code:
<ul id="nav">
<li id="navLineup"><a href="javascript:ajaxpage('lineup.php', 'content_right');">Lineup</a></li>
<li id="navStages"><a href="javascript:ajaxpage('retrostages.php', 'content_right');">Stages</a></li>
<li id="navGallery"><a href="javascript:ajaxpage('gallery_index.php?level=album&id=1', 'content_right');" onclick="focus_first_input(); initLightbox();">Gallery</a></li>
<li id="navRetrospective"><a href="javascript:ajaxpage('retrospective.php', 'content_right');">Gallery</a></li>
</ul>
Code:
<div id="content_right"></div>
Code:
<div id="content_right">
<h1 id="retrovision">Retro vision</h1>
<div id="subcontent">
<?php
require("gallery.php");
the_gallery();
?>
</div>
</div>
Comment