Just like I was, a lot people have been seeking around the web for an easy way of invoking a lightbox as a page loads.
Examples including http://www.bram.us/demo/projects/autofirelightbox/ uses javascript to trigger the lightbox. However, scripts like this one does not work with Drupal’s Lightbox 2 module.
Here is what I used to accomplish this in Drupal, by using JQuery’s triggerHandler function to invoke the click. Hope this will help others who need an auto lightbox pop-up.
<a rel="lightframe" href="" id="link"></a>
<script type="text/javascript">
$(document).ready(function () {
$('#link').triggerHandler("click");
});
</script>Popularity: 8% [?]
Pingback: druapl