<?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>Defvayne23.com</title>
	<atom:link href="http://www.defvayne23.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.defvayne23.com</link>
	<description>A blog by John Hoover</description>
	<lastBuildDate>Sat, 12 Jun 2010 14:53:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>jTube &#8211; Not Just for Javascript</title>
		<link>http://www.defvayne23.com/2010/06/12/jtube-not-just-for-javascript/</link>
		<comments>http://www.defvayne23.com/2010/06/12/jtube-not-just-for-javascript/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 14:53:51 +0000</pubDate>
		<dc:creator>John Hoover</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[jTube]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[YouTube]]></category>

		<guid isPermaLink="false">http://www.defvayne23.com/?p=72</guid>
		<description><![CDATA[My jQuery YouTube API plugin, jTube, has now been ported to a PHP class. The two work similar in the fact that you set a query type (user uploads, feed, playlist, etc.) and set some options. Below is an example: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 &#60;?php [...]]]></description>
			<content:encoded><![CDATA[<p>My jQuery YouTube API plugin, jTube, has now been ported to a PHP class. The two work similar in the fact that you set a query type (user uploads, feed, playlist, etc.) and set some options. Below is an example:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;jTube.Query.php&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$oVideos</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> jTubeQuery<span style="color: #339933;">;</span>
<span style="color: #000088;">$oVideos</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setQuery</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;user&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;defvayne23&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;uploads&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$oVideos</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setOption</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;limit&quot;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">5</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
try <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$aVideos</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$oVideos</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">runQuery</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> catch<span style="color: #009900;">&#40;</span>Exception <span style="color: #000088;">$e</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$e</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getMessage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Use $aVideos</span></pre></td></tr></table></div>

<p>With the PHP class jTube can now make use of authentication and with that the entire YouTube API. The YouTube API allows for anything from uploading a video to supplying feedback on a video (rate, comment, flag). The PHP class already can make use of authentication tokens to retrieve private info for the user that belongs to the token. The first new functionality coming to the PHP class is video managing and upload.</p>
<p><a href="http://github.com/monkeecreate/jtube-php">Checkout jTube for PHP on github now.</a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.defvayne23.com%2F2010%2F06%2F12%2Fjtube-not-just-for-javascript%2F&amp;linkname=jTube%20%26%238211%3B%20Not%20Just%20for%20Javascript"><img src="http://www.defvayne23.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.defvayne23.com/2010/06/12/jtube-not-just-for-javascript/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>jQuery Weather Plugin &#8211; simpleWeather</title>
		<link>http://www.defvayne23.com/2010/05/17/jquery-weather-plugin-simpleweather-2/</link>
		<comments>http://www.defvayne23.com/2010/05/17/jquery-weather-plugin-simpleweather-2/#comments</comments>
		<pubDate>Mon, 17 May 2010 14:30:35 +0000</pubDate>
		<dc:creator>John Hoover</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[simpleWeather]]></category>

		<guid isPermaLink="false">http://www.defvayne23.com/?p=70</guid>
		<description><![CDATA[monkeeCreate has release another jQuery plugin developed by James Fleeting that uses the Yahoo Weather API to pull in weather data by just passing it a zipcode. Using simpleWeather is alot like jTube in the sense that you pass the zipcode and a function to handle the results. Example of some of the results passed [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://monkeecreate.com/">monkeeCreate</a> has release another <a href="http://jquery.com/">jQuery</a> plugin developed by <a href="http://paperkilledrock.com/">James Fleeting</a> that uses the Yahoo Weather API to pull in weather data by just passing it a zipcode. Using <a href="http://simpleweather.monkeecreate.com/">simpleWeather</a> is alot like <a href="http://jtube.monkeecreate.com/">jTube</a> in the sense that you pass the zipcode and a function to handle the results. Example of some of the results passed back are high, low, sunrise, sunset, wind direction, current conditions and forecast.</p>
<p>Checkout simpleWeather on <a href="http://plugins.jquery.com/project/simpleWeather">jQuery Plugins</a> and <a href="http://github.com/monkeecreate/jquery.simpleWeather">GitHub</a>.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.defvayne23.com%2F2010%2F05%2F17%2Fjquery-weather-plugin-simpleweather-2%2F&amp;linkname=jQuery%20Weather%20Plugin%20%26%238211%3B%20simpleWeather"><img src="http://www.defvayne23.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.defvayne23.com/2010/05/17/jquery-weather-plugin-simpleweather-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using jTube &#8211; Video and Thumbnail</title>
		<link>http://www.defvayne23.com/2010/05/14/using-jtube-video-and-thumbnail/</link>
		<comments>http://www.defvayne23.com/2010/05/14/using-jtube-video-and-thumbnail/#comments</comments>
		<pubDate>Fri, 14 May 2010 16:08:21 +0000</pubDate>
		<dc:creator>John Hoover</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jTube]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[YouTube]]></category>

		<guid isPermaLink="false">http://www.defvayne23.com/?p=66</guid>
		<description><![CDATA[This is the final post of the series that has so far covered the very basics of showing a list of video titles, to paging of the list using jTube. In this post I will discuss how to embed a video using jTubeEmbed which comes with the jTube jQuery plugin, also how to show the [...]]]></description>
			<content:encoded><![CDATA[<p>This is the final post of the series that has so far covered the <a href="/2010/05/07/using-jtube-basics/">very basics of showing a list of video titles</a>, <a href="/2010/05/12/using-jtube-paging/">to paging of the list</a> using jTube. In this post I will discuss how to embed a video using jTubeEmbed which comes with the jTube jQuery plugin, also how to show the video thumbnail provided by YouTube. To show these features off I will modify where we left off in the <a href="/2010/05/12/using-jtube-paging/">paging tutorial</a> and show the video for the first entry of the page then show the thumbnail for the other videos on the page.</p>
<p>To show the video only on the first video we need to modify the <a href="http://api.jquery.com/each/">each loop</a> to tell us where we are in the loop. Simply add `index` as the first parameter received.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>12
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">        $<span style="color: #009900;">&#40;</span>videos<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>index<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></pre></td></tr></table></div>

<p><span id="more-66"></span><br />
Now that we know what position we are in the loop, we can check if we are on the first video. Simply add an if statement that checks if the index is 0 (first). If we are on the first, embed the video, otherwise show the link with the title and length. To embed the video we will use the jTubeEmbed function. Only thing it requires is the video url. That is given with the key `video`. In this tutorial we can access that with `this.video`. If you choose not to pass the width and height option, the embed defaults to 290x250px. In our demo we will pass in the dimensions  200x172px so they fit snug in our page. These options are passed in similar to jTube but they go in as a second parameter. We should also show the video title below the video, but not link it since we already have the video.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>13
14
15
16
17
18
19
20
21
22
23
24
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">            videoHTML <span style="color: #339933;">=</span> <span style="color: #3366CC;">'&lt;li&gt;'</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>index <span style="color: #339933;">==</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                videoHTML <span style="color: #339933;">+=</span> $.<span style="color: #660066;">jTubeEmbed</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">video</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>width<span style="color: #339933;">:</span> <span style="color: #CC0000;">200</span><span style="color: #339933;">,</span> height<span style="color: #339933;">:</span> <span style="color: #CC0000;">172</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                videoHTML <span style="color: #339933;">+=</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">title</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
                videoHTML <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'&lt;a href=&quot;'</span><span style="color: #339933;">+</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">link</span><span style="color: #339933;">+</span><span style="color: #3366CC;">'&quot; target=&quot;_blank&quot;&gt;'</span><span style="color: #339933;">;</span>
                videoHTML <span style="color: #339933;">+=</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">title</span><span style="color: #339933;">;</span>
                videoHTML <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'&lt;/a&gt; - '</span><span style="color: #339933;">+</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">length</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
&nbsp;
            videoHTML <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'&lt;/li&gt;'</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Now that we <a href="/demo/using-jtube-video-and-thumbnail/beta.html">have the video showing up</a> lets add the thumbnail. Each video that jTube returns we have a url for the thumbnail, accessible with the key `thumbnail`. This will return the image url which you can put as the source in your img tag. To not overflow the page with large thumbnails, also set the width to 200px to match the video and height to 150px to keep the aspect ratio.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>19
20
21
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">                videoHTML <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'&lt;a href=&quot;'</span><span style="color: #339933;">+</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">link</span><span style="color: #339933;">+</span><span style="color: #3366CC;">'&quot; target=&quot;_blank&quot;&gt;'</span><span style="color: #339933;">;</span>
                videoHTML <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'&lt;img src=&quot;'</span><span style="color: #339933;">+</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">thumbnail</span><span style="color: #339933;">+</span><span style="color: #3366CC;">'&quot; width=&quot;200&quot; height=&quot;150&quot;&gt;&lt;br&gt;'</span><span style="color: #339933;">;</span>
                videoHTML <span style="color: #339933;">+=</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">title</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>That should sum it up for this series of jTube tutorials. I have now covered <a href="/2010/05/07/using-jtube-basics/">getting users uploaded videos</a>, <a href="/2010/05/07/using-jtube-basics/">success function</a>, <a href="/2010/05/07/using-jtube-basics/">error function</a>, <a href="/2010/05/12/using-jtube-paging/">paging</a>, <a href="/2010/05/12/using-jtube-paging/">limit number of videos per page</a>, <a href="/2010/05/12/using-jtube-paging/">videos from YouTube feeds</a>, embed video using jTubeEmbed, and thumbnails.</p>
<p>Next series will cover user feeds including subscriptions and playlists. Including getting the videos from those playlists.</p>
<p>If you have any request for help or tutorials either <a href="#respond">leave a comment</a> or <a href="/contact/">submit a comment</a>.</p>
<h3>Complete Code:</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #003366; font-weight: bold;">var</span> currentPage <span style="color: #339933;">=</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> options <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
    feed<span style="color: #339933;">:</span> <span style="color: #3366CC;">'top_rated'</span><span style="color: #339933;">,</span>
    limit<span style="color: #339933;">:</span> <span style="color: #CC0000;">12</span><span style="color: #339933;">,</span>
    page<span style="color: #339933;">:</span> currentPage<span style="color: #339933;">,</span>
    success<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>videos<span style="color: #339933;">,</span> numberPages<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#myVideos'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#currentPage'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span>currentPage<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#numberPages'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span>numberPages<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        $<span style="color: #009900;">&#40;</span>videos<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>index<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            videoHTML <span style="color: #339933;">=</span> <span style="color: #3366CC;">'&lt;li&gt;'</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>index <span style="color: #339933;">==</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                videoHTML <span style="color: #339933;">+=</span> $.<span style="color: #660066;">jTubeEmbed</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">video</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>width<span style="color: #339933;">:</span> <span style="color: #CC0000;">200</span><span style="color: #339933;">,</span> height<span style="color: #339933;">:</span> <span style="color: #CC0000;">172</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                videoHTML <span style="color: #339933;">+=</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">title</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
                videoHTML <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'&lt;a href=&quot;'</span><span style="color: #339933;">+</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">link</span><span style="color: #339933;">+</span><span style="color: #3366CC;">'&quot; target=&quot;_blank&quot;&gt;'</span><span style="color: #339933;">;</span>
                videoHTML <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'&lt;img src=&quot;'</span><span style="color: #339933;">+</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">thumbnail</span><span style="color: #339933;">+</span><span style="color: #3366CC;">'&quot; width=&quot;200&quot; height=&quot;150&quot;&gt;&lt;br&gt;'</span><span style="color: #339933;">;</span>
                videoHTML <span style="color: #339933;">+=</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">title</span><span style="color: #339933;">;</span>
                videoHTML <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'&lt;/a&gt; - '</span><span style="color: #339933;">+</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">length</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
&nbsp;
            videoHTML <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'&lt;/li&gt;'</span><span style="color: #339933;">;</span>
&nbsp;
            $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#myVideos'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span>videoHTML<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #006600; font-style: italic;">//Back</span>
        <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>currentPage <span style="color: #339933;">!=</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#pageBack'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">removeClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'disabled'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">unbind</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>event<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                currentPage <span style="color: #339933;">=</span> currentPage <span style="color: #339933;">-</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">;</span>
                options.<span style="color: #660066;">page</span> <span style="color: #339933;">=</span> currentPage<span style="color: #339933;">;</span>
                $.<span style="color: #660066;">jTube</span><span style="color: #009900;">&#40;</span>options<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                event.<span style="color: #660066;">preventDefault</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
            $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#pageBack'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'disabled'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">unbind</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span>empty<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #006600; font-style: italic;">//Next</span>
        <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>currentPage <span style="color: #339933;">&lt;</span> numberPages<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#pageNext'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">removeClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'disabled'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">unbind</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>event<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                currentPage <span style="color: #339933;">=</span> currentPage <span style="color: #339933;">+</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">;</span>
                options.<span style="color: #660066;">page</span> <span style="color: #339933;">=</span> currentPage<span style="color: #339933;">;</span>
                $.<span style="color: #660066;">jTube</span><span style="color: #009900;">&#40;</span>options<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                event.<span style="color: #660066;">preventDefault</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
            $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#pageNext'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'disabled'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">unbind</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span>empty<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
    error<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>error<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#myVideos'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;li class=&quot;error&quot;&gt;'</span><span style="color: #339933;">+</span>error<span style="color: #339933;">+</span><span style="color: #3366CC;">'&lt;/li&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> empty <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>event<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>event.<span style="color: #660066;">preventDefault</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#pageBack, #pageNext&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span>empty<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
$.<span style="color: #660066;">jTube</span><span style="color: #009900;">&#40;</span>options<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span>
&lt;ul id=&quot;myVideos&quot;&gt;&lt;/ul&gt;
&lt;a href=&quot;&quot; id=&quot;pageBack&quot; class=&quot;disabled&quot;&gt;Back&lt;/a&gt; - Page &lt;span id=&quot;currentPage&quot;&gt;1&lt;/span&gt; of &lt;span id=&quot;numberPages&quot;&gt;1&lt;/span&gt; - &lt;a href=&quot;&quot; id=&quot;pageNext&quot; class=&quot;disabled&quot;&gt;Next&lt;/a&gt;</pre></td></tr></table></div>

<h4><a href="/demo/using-jtube-video-and-thumbnail/final.html" target="_blank">View Demo</a></h4>
<h3>Keep up with jTube</h3>
<ul>
<li><a href="http://github.com/monkeecreate/jTube">GitHub</a></li>
<li><a href="http://plugins.jquery.com/project/jTube">jQuery Plugins</a></li>
<li><a href="http://twitter.com/defvayne23">My Twitter</a></li>
<li><a href="http://twitter.com/monkeecreate">monkeeCreate Twitter</a></li>
</ul>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.defvayne23.com%2F2010%2F05%2F14%2Fusing-jtube-video-and-thumbnail%2F&amp;linkname=Using%20jTube%20%26%238211%3B%20Video%20and%20Thumbnail"><img src="http://www.defvayne23.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.defvayne23.com/2010/05/14/using-jtube-video-and-thumbnail/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
