By default, jQuery thickbox plugin displays a thickbox overlay window when you click on a link which class is set to thickbox
. The following code lets you display thickbox on page load without hacking anything in thickbox code.
<script type="text/javascript">
$(document).ready(function(){
tb_show("Announcement","announcement.html?height=300&width=300", "");
});
</script>
Thanks, exactly what I was looking for!
This only displays a blank white thickbox with a title, my test.html page isn’t displaying.
Any ideas?
Oops, sorry – my mistake, it does work!!
My test page isn’t displaying the ESC /hit close and also got a blank page. How did you fix this? Can you post your solution. Thanks.
Great. I was looking for it ! :)
I was wandering if there was a way to have this javascript do some other things…
1:) Set a Cookie that (reopen next visit, do not allow ever, allow if a file has been updated on the server directory since last visit) and lasts 30-90 days (perhaps
2:) Checks if a file (announcements.html) has been updated (since last site access) and opens it up in a thickbox if it has a newer date since the last visit…
Thank YOU Thank YOU Thank YOU! this made it so easy!
Man I have been looking for this forever. No idea why it took so long to find. It seemed like a simple thing to me just couldn’t figure it out. Thanks a ton.