<?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>Anthony Shapley &#187; Javascript Archives  &#8211; Anthony Shapley</title>
	<atom:link href="http://www.anthonyshapley.co.uk/category/internet/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.anthonyshapley.co.uk</link>
	<description>Search Engine Optimisation &#38; Pay Per Click</description>
	<lastBuildDate>Mon, 10 Oct 2011 07:46:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>jQuery Lightbox on WordPress &#8211; Simple install guide</title>
		<link>http://www.anthonyshapley.co.uk/jquery-lightbox-on-wordpress-simple-install-guide/</link>
		<comments>http://www.anthonyshapley.co.uk/jquery-lightbox-on-wordpress-simple-install-guide/#comments</comments>
		<pubDate>Wed, 20 Aug 2008 17:32:02 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.anthonyshapley.co.uk/?p=469</guid>
		<description><![CDATA[I was originally using a prototype based version, which was fine until I started learning jQuery, then I had to search for an alternative.
Whilst this was easy to find, there were no instructions for the novice on how to put this into  ]]></description>
			<content:encoded><![CDATA[<p>I was originally using a prototype based version, which was fine until I started learning jQuery, then I had to search for an alternative.</p>
<p>Whilst this was easy to find, there were no instructions for the novice on how to put this into WordPress easily. In this tutorial I&#8217;m using WordPress 2.6.1 (the latest version). You should be able to do this in about 20 minutes with little hassle.</p>
<h3>Resources</h3>
<p>First things first you need the jQuery javascript library which you can get from <a href="http://jquery.com/" target="_blank">http://jquery.com/</a>Â the latest version is 1.2.6. I would get the &#8220;minified&#8221; version as this has had all the unnecessary bits taken out making it faster for the browse to parse.</p>
<p>You then need to get the jQuery lightbox &#8220;plugin&#8221; from <a href="http://leandrovieira.com/projects/jquery/lightbox/" target="_blank">http://leandrovieira.com/projects/jquery/lightbox/</a>.</p>
<h3>Installation</h3>
<p>So you&#8217;ve got your bits, open up the file &#8220;jquery.lightbox-0.5.js&#8221; and you are going to need to change the image paths to your theme image directory. This will probably be something like &#8220;/wp-content/themes/your-theme-name/images/imagename.gif&#8221;.</p>
<p>Then open up your FTP Client and upload all the images to that directory. Once you&#8217;ve got that far, go back to your browse of choice and login to your blog.Â You may or may not have a &#8220;js&#8221; folder in your theme directory, if not create one and upload the jQuery library and the Lightbox Plug-in. Finally upload the CSS file supplied with the lightboxÂ to the root of the theme, or somewhere else if you prefer.</p>
<p>Now login to your Blog click on the &#8220;Design&#8221; tab then the &#8220;Theme Editor&#8221; sub tab. We want to edit the &#8220;header.php&#8221; file.<br />
Note: This will not work if permissions haven&#8217;t been setup correctly. If your unable to save the file, go back to your FTP Client and use Chmod to correctly set permissions.</p>
<p>Once your looking at the header.php file we want to include the two Javascript files, then write a little bit of our own. Between the &#8220;&lt;head&gt;&lt;/head&gt;&#8221; tags you want to put:</p>
<p>Â &lt;script type=&#8221;text/javascript&#8221; src=&#8221;&lt;?php bloginfo(&#8216;template_directory&#8217;); ?&gt;/js/jquery-1.2.6.min.js&#8221;&gt;&lt;/script&gt;<br />
Â Â Â  &lt;script type=&#8221;text/javascript&#8221; src=&#8221;&lt;?php bloginfo(&#8216;template_directory&#8217;); ?&gt;/js/jquery.lightbox-0.5.js&#8221;&gt;&lt;/script&gt;<br />
Â &lt;link rel=&#8221;stylesheet&#8221; type=&#8221;text/css&#8221; href=&#8221;&lt;?php bloginfo(&#8216;template_directory&#8217;); ?&gt;/jquery.lightbox-0.5.css&#8221; media=&#8221;screen&#8221; /&gt;</p>
<p>So you&#8217;ve now successfuly included all the files needed, the last thing is to add:</p>
<p>Â &lt;script type=&#8221;text/javascript&#8221;&gt;<br />
Â $(document).ready(function()<br />
Â {<br />
Â // jQuery LightBox<br />
Â Â $(&#8216;a[@href$=".jpg"]&#8216;).lightBox();<br />
Â });<br />
Â &lt;/script&gt;</p>
<p>This will force all links ending with .jpg like the built in Gallery + any others in your posts to use the jQuery Lightbox Gallery.</p>
<p>Hope this helps.</p>
<p>Image from: <a href="http://danphilibin.com/flare-wallpapers-now-available/">http://danphilibin.com/flare-wallpapers-now-available/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthonyshapley.co.uk/jquery-lightbox-on-wordpress-simple-install-guide/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
	</channel>
</rss>

