<?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>Dave Smith.info</title>
	<atom:link href="http://www.dave-smith.info/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dave-smith.info</link>
	<description>Just another Dave Smith</description>
	<lastBuildDate>Thu, 25 Feb 2010 08:40:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Google Analytics Asynchronous Snippet for the Head Element</title>
		<link>http://www.dave-smith.info/2010/02/19/google-analytics-asynchronous-snippet-for-the-head-element/</link>
		<comments>http://www.dave-smith.info/2010/02/19/google-analytics-asynchronous-snippet-for-the-head-element/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 16:04:43 +0000</pubDate>
		<dc:creator>Dave Smith</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.dave-smith.info/?p=131</guid>
		<description><![CDATA[The below snippet worked with my test page where the current asynchronous snippet when placed in the head element would cause IE6 to stumble with &#8220;Operation Aborted&#8221;. The test page markup can be found at the bottom of the post.
The snippet:
&#60;script type="text/javascript"&#62;
  var _gaq = _gaq &#124;&#124; [];
  _gaq.push(['_setAccount', 'UA-XXXXX-X']);
  _gaq.push(['_trackPageview']);

  [...]]]></description>
			<content:encoded><![CDATA[<p>The below snippet worked with my test page where the current <a href="http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html#Snippet">asynchronous snippet</a> when placed in the head element would cause IE6 to stumble with &#8220;Operation Aborted&#8221;. The test page markup can be found at the bottom of the post.</p>
<p>The snippet:</p>
<pre>&lt;script type="text/javascript"&gt;
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-XXXXX-X']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(ga, s);
  })();
&lt;/script&gt;</pre>
<p><strong>Please, only use this snippet to test it. Use the one Google provides  with instructions on their <a href="http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html">async page</a>.</strong></p>
<p>Feedback would be appreciated as the snippet has not been tested on a working site as of writing this post.</p>
<h2>The problem I hoped to solve</h2>
<p>Google Analytics guide people to insert the asynchronous snippet at the top of the body element:</p>
<blockquote><p>&#8220;Insert the  asynchronous snippet at the <em>top of the <code>&lt;body&gt;</code> section</em> of your pages.&#8221; &#8211; <a href="http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html">Asynchronous Tracking</a> Installation Instructions 2010 02 19</p></blockquote>
<p>The reason for this was that although the asynchronous snippet could go in the head element, there was a potential problem for IE6 users. The problem was given in the help forum post <a href="http://www.google.com/support/forum/p/Google+Analytics/thread?tid=5532c8dff3e8aa42&amp;hl=en">Async snippet causes IE6 to  close with &#8220;operation aborted&#8221;</a> where a fix was offered:</p>
<blockquote><p>&#8220;The fix is to either make sure all your tags are closed (&lt;base  href=&#8221;&#8230;&#8221;&gt;  becomes &lt;base href=&#8221;&#8230;&#8221;&gt;&lt;/base&gt;) or you can  move your snippet to the top of the &lt;BODY&gt; section instead of  putting it at the bottom of the &lt;HEAD&gt;.&#8221; &#8211; Brian Kuhn</p></blockquote>
<p>And to keep it simple they opted for inserting the code at the top of the body section.</p>
<p>With Brian Kuhn&#8217;s answer in mind my snippet is probably not needed, but it worked on my test page so I posted it here.</p>
<h2>Test page markup</h2>
<h3>IE6 stumbled over this one</h3>
<pre>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
&lt;title&gt;Testing&lt;/title&gt;
&lt;base href="http://www.thunderpants.org/" /&gt;

&lt;script type="text/javascript"&gt;

 var _gaq = _gaq || [];
 _gaq.push(['_setAccount', 'UA-XXXXX-X']);
 _gaq.push(['_trackPageview']);

 (function() {
 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
 (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);

 })();

&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Testing&lt;/h1&gt;
&lt;p&gt;asdiuh asdiuh asdiuh asdihu ausdiuhas diuahsd iasudh aisduh asdiuhasd&lt;/p&gt;
&lt;p&gt;asdiuh asdiuh asdiuh asdihu ausdiuhas diuahsd iasudh aisduh asdiuhasd&lt;/p&gt;
&lt;p&gt;asdiuh asdiuh asdiuh asdihu ausdiuhas diuahsd iasudh aisduh asdiuhasd&lt;/p&gt;
&lt;p&gt;asdiuh asdiuh asdiuh asdihu ausdiuhas diuahsd iasudh aisduh asdiuhasd&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<h3>IE6 seemed fine with this</h3>
<pre>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
&lt;title&gt;Testing&lt;/title&gt;
&lt;base href="http://www.thunderpants.org/" /&gt;

&lt;script type="text/javascript"&gt;

 var _gaq = _gaq || [];
 _gaq.push(['_setAccount', 'UA-XXXXX-X']);
 _gaq.push(['_trackPageview']);

 (function() {
 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
 var s = document.getElementsByTagName('script')[0];
 s.parentNode.insertBefore(ga, s);
 })();

&lt;/script&gt;

&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Testing&lt;/h1&gt;
&lt;p&gt;asdiuh asdiuh asdiuh asdihu ausdiuhas diuahsd iasudh aisduh asdiuhasd&lt;/p&gt;
&lt;p&gt;asdiuh asdiuh asdiuh asdihu ausdiuhas diuahsd iasudh aisduh asdiuhasd&lt;/p&gt;
&lt;p&gt;asdiuh asdiuh asdiuh asdihu ausdiuhas diuahsd iasudh aisduh asdiuhasd&lt;/p&gt;
&lt;p&gt;asdiuh asdiuh asdiuh asdihu ausdiuhas diuahsd iasudh aisduh asdiuhasd&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.dave-smith.info/2010/02/19/google-analytics-asynchronous-snippet-for-the-head-element/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS :content and :section pseudo element selectors</title>
		<link>http://www.dave-smith.info/2009/03/13/css-content-and-section-pseudo-element-selectors/</link>
		<comments>http://www.dave-smith.info/2009/03/13/css-content-and-section-pseudo-element-selectors/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 12:04:24 +0000</pubDate>
		<dc:creator>Dave Smith</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Selectors]]></category>
		<category><![CDATA[Style]]></category>

		<guid isPermaLink="false">http://www.dave-smith.info/?p=116</guid>
		<description><![CDATA[I believe there is a useful and yet missing CSS3 selector. I&#8217;ll explain with a rough example:
&#60;section&#62;
&#60;h1 or h&#62;My section heading&#60;/h1 or h&#62;
&#60;p&#62;Para&#60;/p&#62;
&#60;p&#62;Para&#60;/p&#62;
&#60;p&#62;Para&#60;/p&#62;
&#60;p&#62;Para&#60;/p&#62;
&#60;/section&#62;
Given the above, to style the section content so that it is indented by 20px, but leave the heading with no margin, could be done with:
.section &#62; *:not(h1) {margin-left:20px;}
but what if the following [...]]]></description>
			<content:encoded><![CDATA[<p>I believe there is a useful and yet missing CSS3 selector. I&#8217;ll explain with a rough example:</p>
<pre>&lt;section&gt;
&lt;h1 or h&gt;My section heading&lt;/h1 or h&gt;
&lt;p&gt;Para&lt;/p&gt;
&lt;p&gt;Para&lt;/p&gt;
&lt;p&gt;Para&lt;/p&gt;
&lt;p&gt;Para&lt;/p&gt;
&lt;/section&gt;</pre>
<p>Given the above, to style the section content so that it is indented by 20px, but leave the heading with no margin, could be done with:</p>
<p style="padding-left: 30px;">.section &gt; *:not(h1) {margin-left:20px;}</p>
<p>but what if the following was available:</p>
<p style="padding-left: 30px;">h1:content {margin-left:20px;}</p>
<p style="padding-left: 30px;"><em>A pseudo element wraps the content, based on heading scope, and is then styled.</em></p>
<p>and</p>
<p style="padding-left: 30px;">h1:section { }</p>
<p style="padding-left: 30px;"><em>A pseudo element wraps the heading and content, based on heading scope, and is then styled.</em></p>
<p>Apart from being easy to read, one advantage could be in backwards compatibility with old documents (without section elements) that they could be styled just as easily as new ones. Plus it just feels right to me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dave-smith.info/2009/03/13/css-content-and-section-pseudo-element-selectors/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>jQuery.animate-sprite</title>
		<link>http://www.dave-smith.info/2009/03/09/jqueryanimate-sprite/</link>
		<comments>http://www.dave-smith.info/2009/03/09/jqueryanimate-sprite/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 23:44:32 +0000</pubDate>
		<dc:creator>Dave Smith</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.dave-smith.info/?p=111</guid>
		<description><![CDATA[A bit of fun with a jQuery and background image sprite.
Current version 1.0.4 alpha.
]]></description>
			<content:encoded><![CDATA[<p>A bit of fun with a jQuery and background image sprite.</p>
<p>Current version <a href="/jquery.animate-sprite/1.0.4/">1.0.4 alpha</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dave-smith.info/2009/03/09/jqueryanimate-sprite/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>jQuery.stacker-menu</title>
		<link>http://www.dave-smith.info/2009/02/08/jquery-stacker-menu/</link>
		<comments>http://www.dave-smith.info/2009/02/08/jquery-stacker-menu/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 15:53:01 +0000</pubDate>
		<dc:creator>Dave Smith</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[accessible]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[usable]]></category>

		<guid isPermaLink="false">http://www.dave-smith.info/?p=90</guid>
		<description><![CDATA[Out of interest in the varying menu systems at my disposal on the web, I have created some of my own. My lastest, the stacker menu, blends previous ideas with the inspirational jQuery API browser (jQuery) menu. The code is still pretty fragile but in development. Please try out the latest demo and let me [...]]]></description>
			<content:encoded><![CDATA[<p>Out of interest in the varying menu systems at my disposal on the web, I have created some of my own. My lastest, the <a href="/jquery.stacker-menu/">stacker menu</a>, blends previous ideas with the inspirational <a href="http://api.jquery.com/">jQuery API browser (jQuery)</a> menu. The code is still pretty fragile but in development. Please try out the <a href="/jquery.stacker-menu/">latest demo</a> and let me know what you think.</p>
<p>Things I am trying to achieve with the menu:</p>
<ul>
<li>A menu item can be a link, a link and menu or just a menu (alias)</li>
<li>Accessible, especially with a keyboard</li>
<li>Usable</li>
<li>Vertical space managed better than with a tree-like menu</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.dave-smith.info/2009/02/08/jquery-stacker-menu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>jQuery plugin template</title>
		<link>http://www.dave-smith.info/2009/02/07/jquery-plugin-template/</link>
		<comments>http://www.dave-smith.info/2009/02/07/jquery-plugin-template/#comments</comments>
		<pubDate>Sat, 07 Feb 2009 22:45:38 +0000</pubDate>
		<dc:creator>Dave Smith</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[template]]></category>

		<guid isPermaLink="false">http://www.dave-smith.info/?p=77</guid>
		<description><![CDATA[Wanting a quick way to create a plugin in jQuery I found A Plugin Development Pattern (Learning jQuery), by Mike Alsup, via Improving upon the jQuery Plugin Template (Google Groups). Later, much later, I looked in the more obvious place; Plugins/Authoring (jQuery). I work best from hacking examples, so Mike Alsup&#8217;s pattern/template was the most [...]]]></description>
			<content:encoded><![CDATA[<p>Wanting a quick way to create a plugin in jQuery I found <a href="http://www.learningjquery.com/2007/10/a-plugin-development-pattern">A Plugin Development Pattern (Learning jQuery)</a>, by Mike Alsup, via <a href="http://groups.google.com/group/jquery-en/browse_thread/thread/3c6a35bbb7ff7e82/d8f1823893516735?#d8f1823893516735">Improving upon the jQuery Plugin Template (Google Groups)</a>. Later, much later, I looked in the more obvious place; <a href="http://docs.jquery.com/Plugins/Authoring">Plugins/Authoring (jQuery)</a>. I work best from hacking examples, so Mike Alsup&#8217;s pattern/template was the most useful to me.</p>
<p>The only difference between the following template and Mike Alsup&#8217;s is that I&#8217;ve stripped it down to just the essentials.</p>
<h3>The template</h3>
<pre>(function($)
{
	$.fn.plugin = function(options)
	{
		// Set the options.
		options = $.extend({}, $.fn.plugin.defaults, options);

		// Go through the matched elements and return the jQuery object.
		return this.each(function()
		{
		});
	};
	// Public defaults.
	$.fn.plugin.defaults = {
		property: 'value'
	};
	// Private functions.
	function func()
	{
		return;
	};
	// Public functions.
	$.fn.plugin.func = function()
	{
		return;
	};
})(jQuery);</pre>
<h3>Updates</h3>
<ol>
<li>Removed &#8220;var&#8221; where not required, many thanks to Jim (<a href="http://www.dave-smith.info/2009/02/07/jquery-plugin-template/comment-page-1/#comment-961">Jim&#8217;s comment</a>)</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.dave-smith.info/2009/02/07/jquery-plugin-template/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Progressive JPEGs for thumbnails?</title>
		<link>http://www.dave-smith.info/2009/01/13/progressive-jpegs-thumbnails-2/</link>
		<comments>http://www.dave-smith.info/2009/01/13/progressive-jpegs-thumbnails-2/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 14:34:40 +0000</pubDate>
		<dc:creator>Dave Smith</dc:creator>
				<category><![CDATA[What now if then]]></category>
		<category><![CDATA[jpeg]]></category>
		<category><![CDATA[progressive jpeg]]></category>
		<category><![CDATA[thumbnail]]></category>

		<guid isPermaLink="false">http://www.dave-smith.info/?p=35</guid>
		<description><![CDATA[Just had a thought that maybe the browsers could sort this out. A browser could detect when a JPEG is shown smaller than full-size and choose to download only what is needed.
For example, if a JPEG is displayed 100% or larger then the full image is downloaded. If displayed at 20% then maybe only the [...]]]></description>
			<content:encoded><![CDATA[<p>Just had a thought that maybe the browsers could sort this out. A browser could detect when a JPEG is shown smaller than full-size and choose to download only what is needed.</p>
<p>For example, if a JPEG is displayed 100% or larger then the full image is downloaded. If displayed at 20% then maybe only the first pass is downloaded. If then changed to 100% with Javascript or CSS or both, then a browser would download the rest of the image.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dave-smith.info/2009/01/13/progressive-jpegs-thumbnails-2/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Progressive JPEGs for thumbnails?</title>
		<link>http://www.dave-smith.info/2009/01/08/progressive-jpegs-thumbnails/</link>
		<comments>http://www.dave-smith.info/2009/01/08/progressive-jpegs-thumbnails/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 11:49:54 +0000</pubDate>
		<dc:creator>Dave Smith</dc:creator>
				<category><![CDATA[What now if then]]></category>
		<category><![CDATA[jpeg]]></category>
		<category><![CDATA[progressive jpeg]]></category>
		<category><![CDATA[thumbnail]]></category>

		<guid isPermaLink="false">http://www.dave-smith.info/?p=28</guid>
		<description><![CDATA[Not possible as far as I&#8217;m aware, but thumbnails do annoy me. Either they are processed smaller version of the full image &#8211; a form of duplication. Or the full version is used but displayed smaller &#8211; bandwidth, page loading times and browser image resizing beauty niggles.
Progressive JPEGs load progressively with each iteration enhancing the [...]]]></description>
			<content:encoded><![CDATA[<p>Not possible as far as I&#8217;m aware, but thumbnails do annoy me. Either they are processed smaller version of the full image &#8211; a form of duplication. Or the full version is used but displayed smaller &#8211; bandwidth, page loading times and browser image resizing beauty niggles.</p>
<p>Progressive JPEGs load progressively with each iteration enhancing the previous. The first iteration will be poor quality but probably good enough to pass as a thumbnail. Then if the full image is wanted the browser will just download what it doesn&#8217;t already have.</p>
<p>Anyone know if this is possible?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dave-smith.info/2009/01/08/progressive-jpegs-thumbnails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery.linkify</title>
		<link>http://www.dave-smith.info/2008/12/21/jquery-linkify/</link>
		<comments>http://www.dave-smith.info/2008/12/21/jquery-linkify/#comments</comments>
		<pubDate>Sun, 21 Dec 2008 17:40:19 +0000</pubDate>
		<dc:creator>Dave Smith</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[linkify]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[section]]></category>

		<guid isPermaLink="false">http://www.dave-smith.info/?p=22</guid>
		<description><![CDATA[A plugin for jQuery turning sections into links. Read the  jQuery.linkify page for a demo and more info.
]]></description>
			<content:encoded><![CDATA[<p>A plugin for jQuery turning sections into links. Read the  <a href="http://www.dave-smith.info/jquery.linkify/">jQuery.linkify page</a> for a demo and more info.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dave-smith.info/2008/12/21/jquery-linkify/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Right then</title>
		<link>http://www.dave-smith.info/2008/09/23/right-then/</link>
		<comments>http://www.dave-smith.info/2008/09/23/right-then/#comments</comments>
		<pubDate>Tue, 23 Sep 2008 13:24:30 +0000</pubDate>
		<dc:creator>Dave Smith</dc:creator>
				<category><![CDATA[What now if then]]></category>

		<guid isPermaLink="false">http://www.dave-smith.info/?p=5</guid>
		<description><![CDATA[I&#8217;ve started this thing
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve started this thing</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dave-smith.info/2008/09/23/right-then/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
