<?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>I am Ad Taylor &#187; jquery</title>
	<atom:link href="http://www.iamadtaylor.com/tag/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.iamadtaylor.com</link>
	<description>The portfolio and blog of Ad Taylor</description>
	<lastBuildDate>Thu, 20 May 2010 22:49:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Perch Admin collapsable menu</title>
		<link>http://www.iamadtaylor.com/perch-admin-collapsable-menu/</link>
		<comments>http://www.iamadtaylor.com/perch-admin-collapsable-menu/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 09:20:22 +0000</pubDate>
		<dc:creator>Ad Taylor</dc:creator>
				<category><![CDATA[shorts]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[Perch]]></category>

		<guid isPermaLink="false">http://www.iamadtaylor.com/?p=225</guid>
		<description><![CDATA[<p>My only gripe with the Perch admin interface was the landing page or more specifically the huge list of regions, I was finding that it looked daunting to new editors. This is something that Perch are looking at but I wanted a solution for the meantime. Unfortunately the solution is horribly hacky, involving altering the perch.js file.</p>]]></description>
			<content:encoded><![CDATA[<p>I <strong>promise</strong> that this will be my last post about <span class="vcard"><a href="http://www.grabaperch.com" class="url org">Perch</a></span>, I am starting to look somewhat obsessed.
</p>
<p>This hack was born out of necessity as I found that the admin <abbr title="User Interface">UI</abbr> on large <span class="vcard"><a href="http://www.grabaperch.com" class="url org">Perch</a></span> sites looked daunting to new editors.  Though the <abbr title="User Interface">UI</abbr> is beautiful and clean I was finding the lists would be endless and the editor could not find the page, let alone the region. This is something that Perch are looking at but I wanted a solution for the meantime. Unfortunately the solution is horribly hacky, involving altering the perch.js file.</p>
<h3>How to</h3>
<p>Add the following to the bottom of the perch.js file (found in the <code>your-perch-folder/assets/js/perch.js</code>)</p>
<pre name="code" class="javascript">
function pageTidy () {
	if($('td.page').length > 1) {
		resetToTidy();
		$('.page span').css({ cursor: 'pointer' });
		$('.page span').click(function() {
			resetToTidy();
			$(this).parent('td').parent('tr').addClass('currentPage');
			$('.currentPage').children('td').show();
			$('.currentPage').nextAll().each(function(index) {
				if($(this).css('display') == 'table-row'){
					return false;
				}
				$(this).show();
			});
		});
	}

}
function resetToTidy() {
	$('.d  tbody tr').hide();
	$('.shared').parent('tr').show();
	$('.shared').parent('tr').nextAll().each(function(index) {
		if($(this).children('td').hasClass('page')) {
			return false;
		}
		$(this).show();
	});
	$('.d tr').removeClass('currentPage');
	$('.page').parent('tr').show();
	$('.page').siblings('td').hide();
}
</pre>
<p>Then add <code>pageTidy();</code> to the init function. So it would now look like:</p>
<pre name="code" class="javascript">
var init	= function() {
		$('body').addClass('js');
		enhanceCSS();
		initPopups();
		hideMessages();
		pageTidy();
	};
</pre>
<h3>Warning</h3>
<p>Use at your own risk! I have found it seems to work happily on my project but I can&#8217;t imagine that it&#8217;s a good idea to be hacking away at core files. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.iamadtaylor.com/perch-admin-collapsable-menu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Detecting old versions of Firefox for progressive enhancement</title>
		<link>http://www.iamadtaylor.com/detecting-old-versions-of-firefox-for-progressive-enhancement/</link>
		<comments>http://www.iamadtaylor.com/detecting-old-versions-of-firefox-for-progressive-enhancement/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 10:02:51 +0000</pubDate>
		<dc:creator>Ad Taylor</dc:creator>
				<category><![CDATA[shorts]]></category>
		<category><![CDATA[browser sniffing]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[progressive enhancement]]></category>

		<guid isPermaLink="false">http://www.iamadtaylor.com/?p=176</guid>
		<description><![CDATA[CSS3 -moz-transform doesn't work in older version of Firefox. Here I show how to detect firefox browser versions using jQuery. ]]></description>
			<content:encoded><![CDATA[<p>Today I have been redesigning my CV (as you do) as I wanted it to be hosted/printed/enjoyed from my site and not as a PDF. Whilst designing it I saw a post by <a href="http://snook.ca" class="vcard fn url">Jonathan Snook</a> on <a href="http://snook.ca/archives/html_and_css/css-text-rotation">CSS text rotation</a>, this is really exciting as Jonathan also shows you how to use a filter to make it work in IE — exciting stuff.</p>
<p>I decided to use it on my CV, but whilst designing I noticed it wasn&#8217;t working in Firefox older than 3.5. This sucked. So I set about <strong>BROWSER SNIFFING</strong>. I didn&#8217;t take this decision lightly but I figured it is no different to <code>[if IE]</code> and the only difference to the code would be removing a class.</p>
<h4>jQuery to the rescue</h4>
<p>To make long story short, I used the version function in jquery. Comments are in the code:</p>
<pre>
<code>
if($.browser.firefox || $.browser.mozilla) {

 var ver = $.browser.version;

 // Take out al the full stops so we can use it
 // as an integer
 ver = ver.replace(/\./g,"");

 // As the version numbers differ in length
 // we force all numbers to be the same length.
 // This is ok as we are only interested in the
 // first couple of digits
 var verl = ver.length;
 while (verl < 7) {ver = ver + '0'; verl = ver.length;}
 ver = parseInt(ver);

 // Check to see if the browser is older that 3.5
 if(ver <= "1910000") {$("h3").removeClass('rotate');}

}</code>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.iamadtaylor.com/detecting-old-versions-of-firefox-for-progressive-enhancement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

