Launch Thickbox onload Instead Of click

Posted by: FitR on March 4th, 2009 (4,396 views | No Comments) 1079

Easy Way To Trigger Thickbox onload

ThickBox is a webpage UI dialog widget written in JavaScript on top of the jQuery library. Its function is to show a single image, multiple images, inline content, iframed content, or content served through AJAX in a hybrid modal. Thickbox is quite well known and a lot of people are using on their website.

Thickbox is poping up when you click on the link. However, if you want to launch Thickbox right after opening the page – onload. Thre’s a quite simple way to do so. As actual Thickbox is calling from the function called tb_show(), you can call it from the jQeury when the page is ready.

So just call the function in the jQuery “ready” event after the external link to the thickbox file like below.





That’s it! It’s very simple, isn’t it? Hope you found it useful to solve your problem.

Now What?

You might be interested in these related posts.

Help us spread the word across!

Sponsored by
About the Author

Fish in the River delivers a fresh inspiration source for designers, developers and marketers but also anyone who wants to be inspired everyday.

Visit FitR's Homepage       Visit FitR on Twitter

Comments No Comments

Leave a Comment
Would you like to be the first to leave a comment?
Please feel free to let us know what you think.

Leave Comment Leave a Comment

Want a Personal Avatar? Visit www.gravatar.com to get your own gravatar, a globally-recognized avatar.
Submit a Comment
We are what we repeatedly do. Excellence, then, is not an act, but a habit.
{ Aristotle }