<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments for Userbag.co.uk</title>
	<atom:link href="http://userbag.co.uk/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://userbag.co.uk</link>
	<description>The blog of Carl</description>
	<lastBuildDate>Wed, 14 Mar 2012 22:53:51 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on JavaScript eyes that follow the cursor. by Mike</title>
		<link>http://userbag.co.uk/development/javascript-eyes-that-follow-the-cursor/comment-page-1/#comment-854</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Wed, 14 Mar 2012 22:53:51 +0000</pubDate>
		<guid isPermaLink="false">http://userbag.co.uk/?p=150#comment-854</guid>
		<description>Great Work, when i saw your work instantly i had an idea to how implement this example with a client website redesign but in this case is a owl. Thx to share</description>
		<content:encoded><![CDATA[<p>Great Work, when i saw your work instantly i had an idea to how implement this example with a client website redesign but in this case is a owl. Thx to share</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JavaScript URL Parser by Carl</title>
		<link>http://userbag.co.uk/development/javascript-url-parser/comment-page-1/#comment-641</link>
		<dc:creator>Carl</dc:creator>
		<pubDate>Sat, 14 Jan 2012 16:51:27 +0000</pubDate>
		<guid isPermaLink="false">http://userbag.co.uk/?p=227#comment-641</guid>
		<description>@IT Support: What&#039;s the trouble you seem to be having?</description>
		<content:encoded><![CDATA[<p>@IT Support: What&#8217;s the trouble you seem to be having?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JavaScript URL Parser by IT support</title>
		<link>http://userbag.co.uk/development/javascript-url-parser/comment-page-1/#comment-568</link>
		<dc:creator>IT support</dc:creator>
		<pubDate>Fri, 23 Dec 2011 09:54:34 +0000</pubDate>
		<guid isPermaLink="false">http://userbag.co.uk/?p=227#comment-568</guid>
		<description>var test = urlParse(&quot;http://www.sub.domain.com:1337/test/sample.php?queryArg1=Hello&amp;queryArg2=Goodby&quot;);
alert(test.getQueryParam(&#039;queryArg2&#039;)); // &quot;goodbye&quot;
alert(test.getPort()); // &quot;1337&quot;
alert(test.getHost()); // &quot;www.sub.domain.com&quot;
alert(test.getPath()); // &quot;/test/sample.php&quot;
//Alterntive usage
alert(urlParse(&quot;http://test.com:17/?a=Cake&amp;b=Cheese&quot;).getQueryParam(&#039;a&#039;)); // &quot;Cake&quot;</description>
		<content:encoded><![CDATA[<p>var test = urlParse(&#8220;http://www.sub.domain.com:1337/test/sample.php?queryArg1=Hello&amp;queryArg2=Goodby&#8221;);<br />
alert(test.getQueryParam(&#8216;queryArg2&#8242;)); // &#8220;goodbye&#8221;<br />
alert(test.getPort()); // &#8220;1337&#8243;<br />
alert(test.getHost()); // &#8220;www.sub.domain.com&#8221;<br />
alert(test.getPath()); // &#8220;/test/sample.php&#8221;<br />
//Alterntive usage<br />
alert(urlParse(&#8220;http://test.com:17/?a=Cake&amp;b=Cheese&#8221;).getQueryParam(&#8216;a&#8217;)); // &#8220;Cake&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JavaScript URL Parser by Carl</title>
		<link>http://userbag.co.uk/development/javascript-url-parser/comment-page-1/#comment-499</link>
		<dc:creator>Carl</dc:creator>
		<pubDate>Fri, 07 Oct 2011 14:18:02 +0000</pubDate>
		<guid isPermaLink="false">http://userbag.co.uk/?p=227#comment-499</guid>
		<description>Yikes, totally didn&#039;t notice I was writing in to the global scope o.o Will fix when i get home.</description>
		<content:encoded><![CDATA[<p>Yikes, totally didn&#8217;t notice I was writing in to the global scope o.o Will fix when i get home.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JavaScript URL Parser by Rikki Loades</title>
		<link>http://userbag.co.uk/development/javascript-url-parser/comment-page-1/#comment-498</link>
		<dc:creator>Rikki Loades</dc:creator>
		<pubDate>Fri, 07 Oct 2011 13:36:35 +0000</pubDate>
		<guid isPermaLink="false">http://userbag.co.uk/?p=227#comment-498</guid>
		<description>The way you assign stuff to this inside the urlParse function and return it is actually pretty dangerous. With how you are calling it, &quot;this&quot; in that context gets set to the Javascript &quot;head&quot; object - basically window. This means you are writing the variables into window and then returning window.

Why is this bad?...

Say you did the following:

var test = urlParse(&quot;http://example.com&quot;);
var test2 = urlParse(&quot;http://example2.com&quot;);

alert(test.getHost()); // &quot;example2.com&quot;
alert(test2.getHost()); // &quot;example2.com&quot;

console.log(window === test) // true
console.log(test === test2) // true

You either need to create a closure and freeze dry the url in a &quot;hoisted&quot; set of local variables or construct an object with the new keyword.</description>
		<content:encoded><![CDATA[<p>The way you assign stuff to this inside the urlParse function and return it is actually pretty dangerous. With how you are calling it, &#8220;this&#8221; in that context gets set to the Javascript &#8220;head&#8221; object &#8211; basically window. This means you are writing the variables into window and then returning window.</p>
<p>Why is this bad?&#8230;</p>
<p>Say you did the following:</p>
<p>var test = urlParse(&#8220;http://example.com&#8221;);<br />
var test2 = urlParse(&#8220;http://example2.com&#8221;);</p>
<p>alert(test.getHost()); // &#8220;example2.com&#8221;<br />
alert(test2.getHost()); // &#8220;example2.com&#8221;</p>
<p>console.log(window === test) // true<br />
console.log(test === test2) // true</p>
<p>You either need to create a closure and freeze dry the url in a &#8220;hoisted&#8221; set of local variables or construct an object with the new keyword.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Create a mobile version of your site with just CSS! by Luke</title>
		<link>http://userbag.co.uk/development/create-a-mobile-version-of-your-site-with-just-css/comment-page-1/#comment-47</link>
		<dc:creator>Luke</dc:creator>
		<pubDate>Tue, 28 Jun 2011 21:39:35 +0000</pubDate>
		<guid isPermaLink="false">http://userbag.co.uk/?p=181#comment-47</guid>
		<description>Pretty neat aren&#039;t they? I managed to add a mobile version (albeit pretty simple) of red-root.com using just mobile queries without having to change any of the HTML of the site, which was good since that would have been a whole of a lot more work.</description>
		<content:encoded><![CDATA[<p>Pretty neat aren&#8217;t they? I managed to add a mobile version (albeit pretty simple) of red-root.com using just mobile queries without having to change any of the HTML of the site, which was good since that would have been a whole of a lot more work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JavaScript eyes that follow the cursor. by Carl</title>
		<link>http://userbag.co.uk/development/javascript-eyes-that-follow-the-cursor/comment-page-1/#comment-46</link>
		<dc:creator>Carl</dc:creator>
		<pubDate>Tue, 28 Jun 2011 18:21:19 +0000</pubDate>
		<guid isPermaLink="false">http://userbag.co.uk/?p=150#comment-46</guid>
		<description>Hello,

Thanks for the feedback. The easiest way to get the script above to use an image for the eyes is probably to switch out the this.create function with something along the lines of this:

&lt;pre  class=&quot;brush: javascript; gutter: true&quot;&gt;
this.create = function create(x,y,size,append){
		//Create DOM node (an img this time)
		var eye = document.createElement(&#039;img&#039;);

		eye.src = &quot;/somefolder/myEyeImage.png&quot;; //Image URL here

		eye.style.width=size;
		eye.style.height=size;
		eye.style.position = &#039;relative&#039;;
		eye.style.top = y+&#039;px&#039;;
		eye.style.left = x+&#039;px&#039;;
		document.getElementById(append).appendChild(eye);
		return eye;
	}
&lt;/pre&gt;

Basically rather than creating a Canvas element and drawing the eye on to it, it creates an image element then sets its src to the location of whatever image you want to be the eye itself. (Just make sure the eye image by default is looking upwards)

Since its a bit of a lazy fix you&#039;ll still have to set the height/width of the image via third parameter of the &quot;new alienEye()&quot; constructor.

Hope that helps,

Carl</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>Thanks for the feedback. The easiest way to get the script above to use an image for the eyes is probably to switch out the this.create function with something along the lines of this:</p>
<pre class="brush: javascript; gutter: true">
this.create = function create(x,y,size,append){
		//Create DOM node (an img this time)
		var eye = document.createElement(&#039;img&#039;);

		eye.src = &quot;/somefolder/myEyeImage.png&quot;; //Image URL here

		eye.style.width=size;
		eye.style.height=size;
		eye.style.position = &#039;relative&#039;;
		eye.style.top = y+&#039;px&#039;;
		eye.style.left = x+&#039;px&#039;;
		document.getElementById(append).appendChild(eye);
		return eye;
	}
</pre>
<p>Basically rather than creating a Canvas element and drawing the eye on to it, it creates an image element then sets its src to the location of whatever image you want to be the eye itself. (Just make sure the eye image by default is looking upwards)</p>
<p>Since its a bit of a lazy fix you&#8217;ll still have to set the height/width of the image via third parameter of the &#8220;new alienEye()&#8221; constructor.</p>
<p>Hope that helps,</p>
<p>Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JavaScript eyes that follow the cursor. by Paul McCauley</title>
		<link>http://userbag.co.uk/development/javascript-eyes-that-follow-the-cursor/comment-page-1/#comment-44</link>
		<dc:creator>Paul McCauley</dc:creator>
		<pubDate>Tue, 28 Jun 2011 17:14:43 +0000</pubDate>
		<guid isPermaLink="false">http://userbag.co.uk/?p=150#comment-44</guid>
		<description>Hey, I really love this tutorial, I&#039;m only learning Jquery and Javascript now so it got a wee bit confusing when you got to the HTML 5 lark with the canvas, lol, I was wondering would you be able to point me in the right direction If I wanted to rotate a .png file to follow the mouse?</description>
		<content:encoded><![CDATA[<p>Hey, I really love this tutorial, I&#8217;m only learning Jquery and Javascript now so it got a wee bit confusing when you got to the HTML 5 lark with the canvas, lol, I was wondering would you be able to point me in the right direction If I wanted to rotate a .png file to follow the mouse?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Image-switcher snippet by Carl</title>
		<link>http://userbag.co.uk/development/image-switcher-snippet/comment-page-1/#comment-39</link>
		<dc:creator>Carl</dc:creator>
		<pubDate>Sun, 26 Jun 2011 21:38:37 +0000</pubDate>
		<guid isPermaLink="false">http://userbag.co.uk/?p=116#comment-39</guid>
		<description>I&#039;ve made a bug fix to the script behind .jsnipImageSwitcher to prevent IE from scrolling to the top of the page every time you change the image.

Essentially I&#039;ve just changed the container for the dots from an A to a SPAN, then updated the CSS accordingly. Checkout the &lt;a href=&#039;/demo/jsnip.js&#039; rel=&quot;nofollow&quot;&gt;JavaScript&lt;/a&gt; and &lt;a href=&#039;/demo/jsnip.css&#039; rel=&quot;nofollow&quot;&gt;CSS&lt;/a&gt; to see the fixed version of the code :).</description>
		<content:encoded><![CDATA[<p>I&#8217;ve made a bug fix to the script behind .jsnipImageSwitcher to prevent IE from scrolling to the top of the page every time you change the image.</p>
<p>Essentially I&#8217;ve just changed the container for the dots from an A to a SPAN, then updated the CSS accordingly. Checkout the <a href='/demo/jsnip.js' rel="nofollow">JavaScript</a> and <a href='/demo/jsnip.css' rel="nofollow">CSS</a> to see the fixed version of the code <img src='http://userbag.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
	</item>
</channel>
</rss>

