<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Team Tutorials &#187; Tips and Tricks</title>
	<atom:link href="http://teamtutorials.com/tag/tips-and-tricks/feed" rel="self" type="application/rss+xml" />
	<link>http://teamtutorials.com</link>
	<description></description>
	<lastBuildDate>Tue, 27 Dec 2011 18:58:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Professional Javascript Based Photo Viewer</title>
		<link>http://teamtutorials.com/web-development-tutorials/professional-javascript-based-photo-viewer?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=professional-javascript-based-photo-viewer</link>
		<comments>http://teamtutorials.com/web-development-tutorials/professional-javascript-based-photo-viewer#comments</comments>
		<pubDate>Wed, 11 Jun 2008 04:55:31 +0000</pubDate>
		<dc:creator>Mike Maguire</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML Tutorials]]></category>
		<category><![CDATA[Web Development Tutorials]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://teamtutorials.com/?p=1555</guid>
		<description><![CDATA[This tutorial will walk you through installing and configuring Lightbox 2. Lightbox allows you to show your pictures on your site in a whole new light. It gives you a sleek and professional look and is VERY easy to implement.]]></description>
			<content:encoded><![CDATA[<p>This tutorial will walk you through installing and configuring Lightbox 2. Lightbox allows you to show your pictures on your site in a whole new light. It gives you a sleek and professional look and is VERY easy to implement. Lightbox is written by<a href="http://www.lokeshdhakar.com/"> Lokesh Dhakar </a> and can be downloaded from <a href="http://www.huddletogether.com/projects/lightbox2/#download">HuddleTogeteher</a></p>
<p><a href='http://teamtutorials.com/wp-content/uploads/2008/06/configuring_lightbox_01.jpg'><img src="http://teamtutorials.com/wp-content/uploads/2008/06/configuring_lightbox_01.jpg" alt="configuring_lightbox_01" title="configuring_lightbox_01" width="633" height="117" class="alignnone size-medium wp-image-1556" /></a></p>
<p>Once the site loads it should take you straight to the download section of the page. Click on it to download the files you need. They will come in.ZIP file.</p>
<p><a href='http://teamtutorials.com/wp-content/uploads/2008/06/configuring_lightbox_02.jpg'><img src="http://teamtutorials.com/wp-content/uploads/2008/06/configuring_lightbox_02.jpg" alt="configuring_lightbox_02" title="configuring_lightbox_02" width="404" height="289" class="alignnone size-medium wp-image-1557" /></a></p>
<p>Save the file to your desktop or somewhere else that you will be able to get to it easily when it is completed.</p>
<p><a href='http://teamtutorials.com/wp-content/uploads/2008/06/configuring_lightbox_03.jpg'><img src="http://teamtutorials.com/wp-content/uploads/2008/06/configuring_lightbox_03.jpg" alt="configuring_lightbox_03" title="configuring_lightbox_03" width="157" height="374" class="alignnone size-medium wp-image-1558" /></a></p>
<p>If you have WinRAR or some other program installed that will uncompress it you will be able to right-click on it and select uncompress to (file name here). </p>
<p><a href='http://teamtutorials.com/wp-content/uploads/2008/06/configuring_lightbox_04.jpg'><img src="http://teamtutorials.com/wp-content/uploads/2008/06/configuring_lightbox_04.jpg" alt="configuring_lightbox_04" title="configuring_lightbox_04" width="553" height="403" class="alignnone size-medium wp-image-1560" /></a></p>
<p>This is what the files look like once you un-compressed them. For the easiest use, you should leave these files the way they are and upload them to your server. If you have a different layout you use on your server (for storing scripts and pictures) I will cover how to make those changes later.</p>
<p>Now we need to create our index.html file that will call these files and make them work. Please note that I added 4 files to the images directory with the names of image-2.jpg, image3.jpg, image4.jpg, and image5.jpg. I have also made the 4 extra thumbnails for them as well and named them accordingly. You can Download the Images.( www.teamtutorials.com/images.zip)</p>
<p>Now let’s look at our code to make this work:</p>
<pre class="brush: xml; title: Code Snippet:; notranslate">
&lt;html&gt;
&lt;head&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;css/lightbox.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;js/prototype.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;js/scriptaculous.js?load=effects,builder&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;js/lightbox.js&quot;&gt;&lt;/script&gt;
&lt;/head&gt;
</pre>
<p>The above lines simply tell the HTML file where to get the javascript to handle our pictures that we are using. It also says where to get our Cascading Style Sheet to format the output. </p>
<pre class="brush: xml; title: Code Snippet:; notranslate">
&lt;body bgcolor = “666666”&gt;
&lt;font color =&quot;FFFFFF&quot;&gt;
 &lt;H2&gt; Set 1 &lt;/H2&gt;
&lt;a href=&quot;images/image-1.jpg&quot; rel=&quot;lightbox[set1]&quot; title=&quot;Set 1 Picture 1&quot;&gt;&lt;img src=&quot;images/thumb-1.jpg&quot;/&gt;&lt;/a&gt;

&lt;a href=&quot;images/image-2.jpg&quot; rel=&quot;lightbox[set1]&quot; title=&quot;Set 1 Picture 2&quot;&gt;&lt;img src=&quot;images/thumb-2.jpg&quot;/&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;

 &lt;H2&gt; Set 2 &lt;/H2&gt;

&lt;a href=&quot;images/image-3.jpg&quot; rel=&quot;lightbox[set2]&quot; title=&quot;Set 2 Picture 1&quot;&gt;&lt;img src=&quot;images/thumb-3.jpg&quot;/&gt;&lt;/a&gt;

&lt;a href=&quot;images/image-4.jpg&quot; rel=&quot;lightbox[set2]&quot; title=&quot;Set 2 Picture 2&quot;&gt;&lt;img src=&quot;images/thumb-4.jpg&quot;/&gt;&lt;/a&gt;

&lt;a href=&quot;images/image-5.jpg&quot; rel=&quot;lightbox[set2]&quot; title=&quot;Set 2 Picture 3&quot;&gt;&lt;img src=&quot;images/thumb-5.jpg&quot;/&gt;&lt;/a&gt;

&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>The above text is simple html to show the images. The only difference you will need to note is the “rel=lightbox[]” area. Notice How the first ones say set1 and the second set say set 2. You can do this with any names you want to make separate sets. This way they can view all the pictures from one set and then go to the next set. If you just have one big set, you can leave the brackets blank. This should work now, as long as you set everything up the way it came in the zip file, if you moved any of the files, you will have to change a few things. One is the line in the html that calls the style sheet. If you have that somewhere else change that line and obviously the images your linking too will be different. If you have the javascripts somewhere else you need to change them in the HTML file as well. If you re-locate the images you need to change some things in the CSS and in one of the JS files.</p>
<p>In the CSS look for these two lines and change them accordingly to match where your images are:</p>
<pre class="brush: css; title: Code Snippet:; notranslate">
#prevLink:hover, #prevLink:visited:hover { background: url(../images/prevlabel.gif) left 15% no-repeat; }
#nextLink:hover, #nextLink:visited:hover { background: url(../images/nextlabel.gif) right 15% no-repeat; }
</pre>
<p>In the lightbox.js file near the top look for these two lines and change them to match where you put your image files:</p>
<pre class="brush: jscript; title: Code Snippet:; notranslate">
LightboxOptions = Object.extend({
    fileLoadingImage:        'images/loading.gif',
    fileBottomNavCloseImage: 'images/closelabel.gif',
</pre>
<p>Other than that every thing should still work. If you have any troubles, ensure that your files are all located in the correct place. I find it simpler to make it work the way it came first, and then move it the way you wanted to make sure that you understand what changes you made.<br />
If the above code all works and you have the files in the correct place the main page should look like this:</p>
<p><a href='http://teamtutorials.com/wp-content/uploads/2008/06/configuring_lightbox_05.jpg'><img src="http://teamtutorials.com/wp-content/uploads/2008/06/configuring_lightbox_05.jpg" alt="configuring_lightbox_05" title="configuring_lightbox_05" width="417" height="349" class="alignnone size-medium wp-image-1559" /></a></p>
<p>When you click on one of the images from a set it should turn into this:</p>
<p><a href='http://teamtutorials.com/wp-content/uploads/2008/06/configuring_lightbox_06.jpg'><img src="http://teamtutorials.com/wp-content/uploads/2008/06/configuring_lightbox_06.jpg" alt="configuring_lightbox_06" title="configuring_lightbox_06" width="480" height="407" class="alignnone size-medium wp-image-1561" /></a></p>
<p> I hope this helps you and that you were able to follow it without any issues. Good luck and thanks for reading.</p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://teamtutorials.com/web-development-tutorials/html-tutorials/javascript-progress-bar" title="JavaScript Progress Bar">JavaScript Progress Bar</a></li><li><a href="http://teamtutorials.com/web-development-tutorials/javascript-progress-bar-2" title="JavaScript Progress Bar 2">JavaScript Progress Bar 2</a></li><li><a href="http://teamtutorials.com/web-development-tutorials/hide-and-show-a-div-using-javascript" title="Hide and Show a Div Using Javascript">Hide and Show a Div Using Javascript</a></li><li><a href="http://teamtutorials.com/web-development-tutorials/use-javascript-to-checkuncheck-checkboxes" title="Use JavaScript to Check/UnCheck Checkboxes">Use JavaScript to Check/UnCheck Checkboxes</a></li><li><a href="http://teamtutorials.com/web-development-tutorials/dynamically-add-textbox-to-site" title="Dynamically Add Textbox to Site">Dynamically Add Textbox to Site</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://teamtutorials.com/web-development-tutorials/professional-javascript-based-photo-viewer/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

