Tuesday, May 06, 2008
16:30 by FoxTwo
Today, for some weird reason, I thought I'd inject some pizazz into my blog. I remembered how some websites had this funky function that is able to pop a picture up in a window INSIDE the web page.
No, it's not the usual javascript prompt or messagebox window. Some people refer to it as a "web 2.0 popup box". What it actually is, is a piece of Javascript code (or several pieces). So, Google being my friend, I went searching for one. Yeah I could probably write one myself but I'm lazy. Besides, why re-invent the wheel when someone else already has done it?
So, Google, my good friend, threw up several links, and I found a website offering the code for FREE, right here.
As a demo, here's a picture of my hamster, Dufus. Click on it to see the javascript in action.
Nice eh?
If, like me, you just want to pop a picture up in a box, the code is very simple. Just add a class='thickbox' into your <a href="...."> part of your link. So the code will look like this:
<a href="http://yoururl.com/images/picture.jpg" class="thickbox"></a>
Well, if you've followed the instructions on the website correctly, you can easily install this script into your own blog/website too. Also, this script is so flexible you can show just about ANYTHING inside a box, not just pictures. Look at the website for demos of how to show websites, text, video or anything that you can hyperlink, inside a box.
16:30 by FoxTwo
Showing Pictures In A Pop Up Web Page Window
WARNING! Geeky Post Ahead!
Today, for some weird reason, I thought I'd inject some pizazz into my blog. I remembered how some websites had this funky function that is able to pop a picture up in a window INSIDE the web page.
No, it's not the usual javascript prompt or messagebox window. Some people refer to it as a "web 2.0 popup box". What it actually is, is a piece of Javascript code (or several pieces). So, Google being my friend, I went searching for one. Yeah I could probably write one myself but I'm lazy. Besides, why re-invent the wheel when someone else already has done it?
So, Google, my good friend, threw up several links, and I found a website offering the code for FREE, right here.
As a demo, here's a picture of my hamster, Dufus. Click on it to see the javascript in action.
Nice eh?
If, like me, you just want to pop a picture up in a box, the code is very simple. Just add a class='thickbox' into your <a href="...."> part of your link. So the code will look like this:
<a href="http://yoururl.com/images/picture.jpg" class="thickbox"></a>
Well, if you've followed the instructions on the website correctly, you can easily install this script into your own blog/website too. Also, this script is so flexible you can show just about ANYTHING inside a box, not just pictures. Look at the website for demos of how to show websites, text, video or anything that you can hyperlink, inside a box.
Labels: internet, JavaScript
Links to this post | 0 comments in Blogger |