2
I’m using AJAX and Lightbox to upload a page. I will not post the whole code but the link I use to activate Lightbox and load the AJAX page is activated like this:
<a class="lightbox" href="#" onclick="abrirPag('editandomi.php?I_POST=<?php echo $posts['ID'] ?>');">
TEXTO OU IMAGEM QUE TERÁ O LINK
</div>
The page editandomi.php
captures by means of GET
the id
of that content and displays detailed information, however i want to improve this... I want to be like on Facebook, when you click on an image or video, if you open a Lightbox and the URL changes to:
https://www.facebook.com/
For something like:
https://www.facebook.com/photo.php?fbid=516159178490002&set=a.409523075820280.1073741826.100002877744748&type=1&theater
and when clicking to close this Lightbox the URL goes back to
https://www.facebook.com/
How to do this type of loading via AJAX?
Your answer was exactly what I was looking for. Including the demo that you give me, since I intend to make a gallery.
– ivan veloso
@ivanveloso I really liked the simplicity of that demo, and the tutorial of the people there is well explained. In your specific case, I think the only option is to open the lightbox automatically when the URL has the photo parameter (in case the user copies the link of the open photo). Success in implementation!
– Bacco