<?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>Curtis Blackwell &#187; javascript</title>
	<atom:link href="http://curtisblackwell.com/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://curtisblackwell.com</link>
	<description>Curtis Blackwell&#039;s portfolio of web &#38; graphic design, accompanied by a design blog..</description>
	<lastBuildDate>Mon, 22 Mar 2010 21:43:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Properly Using Multiple jQuery Functions</title>
		<link>http://curtisblackwell.com/properly-using-multiple-jquery-functions/</link>
		<comments>http://curtisblackwell.com/properly-using-multiple-jquery-functions/#comments</comments>
		<pubDate>Sat, 18 Apr 2009 15:21:30 +0000</pubDate>
		<dc:creator>Curtis</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[portfolio]]></category>

		<guid isPermaLink="false">http://curtisblackwell.com/?p=51</guid>
		<description><![CDATA[Each time I design/develop a new website, I try to learn at least one new thing.
I&#8217;m using LightWindow to display some of my work in my portfolio. LightWindow uses JavaScript, as does the method I used to display my latest tweet. I don&#8217;t really understand why, but whichever of the .js files was linked to [...]]]></description>
			<content:encoded><![CDATA[<p>Each time I design/develop a new website, I try to learn at least one new thing.</p>
<p>I&#8217;m using <a href="http://www.stickmanlabs.com/lightwindow/" onclick="pageTracker._trackPageview('/outgoing/www.stickmanlabs.com/lightwindow/?referer=');">LightWindow</a> to display some of my work in my portfolio. LightWindow uses JavaScript, as does the method I used to display my latest tweet. I don&#8217;t really understand why, but whichever of the .js files was linked to last was the only one that would work. Speaking with my friend <a href="http://joel.thegoodmanblog.com/" onclick="pageTracker._trackPageview('/outgoing/joel.thegoodmanblog.com/?referer=');">Joel</a> led me to the <a href="http://docs.jquery.com/Core/jQuery.noConflict" onclick="pageTracker._trackPageview('/outgoing/docs.jquery.com/Core/jQuery.noConflict?referer=');">solution</a>.</p>
<p>I had to run the function <code>jQuery.<span class="js-function-call">noConflict</span>()</code> and replace each <code>$</code> with <code>jQuery</code>. It&#8217;s explained in more detail on the <a href="http://docs.jquery.com/Core/jQuery.noConflict" onclick="pageTracker._trackPageview('/outgoing/docs.jquery.com/Core/jQuery.noConflict?referer=');">jQuery site</a>, so if you&#8217;re still having trouble, I suggest looking there.</p>
<p><span id="more-51"></span></p>
<p>Here&#8217;s how my code looks now:</p>
<pre class="javascript"><code>
<span class="html-tag">&lt;script </span><span class="html-attribute">src=</span><span class="html-string">"http://curtisblackwell.com/js/jquery-1.3.2.js"</span> <span class="html-attribute">type=</span><span class="html-string">"text/javascript"</span><span class="html-tag">&gt;&lt;/script&gt;</span>

<span class="html-tag">&lt;script </span><span class="html-attribute">type=</span><span class="html-string">"text/javascript"</span><span class="html-tag">&gt;</span>

	jQuery.<span class="js-function-call">noConflict</span>();
		<span class="js-function-call">jQuery</span>(<span class="js-keyword">function</span>(){
			jQuery.<span class="js-function-call">getJSON</span>(<span class="js-string">'http://twitter.com/status/user_timeline/curtisblackwell.json?count=1&#038;callback=?'</span>, <span class="js-keyword">function</span>(data){
				jQuery.<span class="js-function-call">each</span>(data, <span class="js-keyword">function</span>(index, item){
					<span class="js-function-call">jQuery</span>(<span class="js-string">'#tweetscreen'</span>).<span class="js-function-call">append</span>(<span class="js-string">'&lt;div id="tweetz"&gt;&lt;p id="last-tweet"&gt;'</span> + item.text + <span class="js-string">'&lt;span id="blink"&gt;'</span> + <span class="js-string">'|'</span> + <span class="js-string">'&lt;/span&gt;'</span> + <span class="js-string">'&lt;/p&gt;&lt;/div&gt;'</span>);
				});
			});
		});

<span class="html-tag">&lt;/script&gt;</span>

<span class="html-tag">&lt;script </span><span class="html-attribute">type=</span><span class="html-string">"text/javascript"</span> <span class="html-attribute">src=</span><span class="html-string">"/lightwindow/javascript/prototype.js"</span><span class="html-tag">&gt;</span><span class="html-tag">&lt;/script&gt;</span>
<span class="html-tag">&lt;script </span><span class="html-attribute">type=</span><span class="html-string">"text/javascript"</span> <span class="html-attribute">src=</span><span class="html-string">"/lightwindow/javascript/scriptaculous.js?load=effects"</span><span class="html-tag">&gt;</span><span class="html-tag">&lt;/script&gt;</span>
<span class="html-tag">&lt;script </span><span class="html-attribute">type=</span><span class="html-string">"text/javascript"</span> <span class="html-attribute">src=</span><span class="html-string">"/lightwindow/javascript/lightwindow.js"</span><span class="html-tag">&gt;</span><span class="html-tag">&lt;/script&gt;</span>
<span class="html-tag">&lt;link </span><span class="html-attribute">rel=</span><span class="html-string">"stylesheet"</span> <span class="html-attribute">href=</span><span class="html-string">"/lightwindow/css/lightwindow.css"</span> <span class="html-attribute">type=</span><span class="html-string">"text/css"</span> <span class="html-attribute">media=</span><span class="html-string">"screen"</span> <span class="html-tag">/&gt;</span>
</code></pre>
<p><span class="html-comment">&lt;!&#45;&#45; EDIT &#45;&#45;&gt;</span><br />
I have since linked to a javascript file so that my page validates, but the code is the same.</p>
]]></content:encoded>
			<wfw:commentRss>http://curtisblackwell.com/properly-using-multiple-jquery-functions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
