<?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>Tony Thomas &#187; JavaScript</title>
	<atom:link href="http://anthonygthomas.com/category/web-development/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://anthonygthomas.com</link>
	<description>Father to two, husband to one, web developer and musician.</description>
	<lastBuildDate>Mon, 24 May 2010 21:31:28 +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>Baseline WordPress Theme Version 1.0.2</title>
		<link>http://anthonygthomas.com/2010/03/22/baseline-wordpress-theme-version-1-0-2/</link>
		<comments>http://anthonygthomas.com/2010/03/22/baseline-wordpress-theme-version-1-0-2/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 17:34:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Baseline Theme]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[baseline theme]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://anthonygthomas.com/?p=430</guid>
		<description><![CDATA[I&#8217;ve uploaded a new version of the Baseline theme for WordPress development. The only change this time around is that I&#8217;m using wp_enqueue_script() to include WordPress&#8217; existing copy of JQuery. (Hat tip to Chris Coyier.) This seems like a significant enough change to merit a small version bump. I used the Baseline theme as a [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve uploaded a new version of the <a href="http://baseline.truetoneenterprises.com/" onclick="pageTracker._trackPageview('/outgoing/baseline.truetoneenterprises.com/?referer=');">Baseline theme for WordPress development</a>. The only change this time around is that I&#8217;m using <code><a href="http://codex.wordpress.org/Function_Reference/wp_enqueue_script" onclick="pageTracker._trackPageview('/outgoing/codex.wordpress.org/Function_Reference/wp_enqueue_script?referer=');">wp_enqueue_script()</a></code> to include WordPress&#8217; existing copy of JQuery. (<a href="http://digwp.com/2009/06/including-jquery-in-wordpress-the-right-way/" onclick="pageTracker._trackPageview('/outgoing/digwp.com/2009/06/including-jquery-in-wordpress-the-right-way/?referer=');">Hat tip to Chris Coyier</a>.) This seems like a significant enough change to merit a small version bump.</p>
<p>I used the Baseline theme as a launching pad for this website. At least for me, it serves as a good starting point when you begin developing a brand new theme.</p>
<p>If you find this useful, you might be interested in checking out <a href="http://digwp.com/2010/03/wordpress-functions-php-template-custom-functions/" onclick="pageTracker._trackPageview('/outgoing/digwp.com/2010/03/wordpress-functions-php-template-custom-functions/?referer=');">Jeff Star’s functions.php template</a>.<strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://anthonygthomas.com/2010/03/22/baseline-wordpress-theme-version-1-0-2/" rel="bookmark" title="March 22, 2010">Baseline WordPress Theme Version 1.0.2</a></li>
<li><a href="http://anthonygthomas.com/2010/02/16/baseline-theme-version-1-0-1/" rel="bookmark" title="February 16, 2010">Baseline Theme Version 1.0.1</a></li>
<li><a href="http://anthonygthomas.com/2010/02/08/introducing-the-baseline-development-wordpress-theme/" rel="bookmark" title="February 8, 2010">Introducing the Baseline Development WordPress Theme</a></li>
<li><a href="http://anthonygthomas.com/2008/04/14/access-to-free-music-and-emotional-connections/" rel="bookmark" title="April 14, 2008">Access to Free Music and Emotional Connections</a></li>
<li><a href="http://anthonygthomas.com/2008/04/16/apml/" rel="bookmark" title="April 16, 2008">APML</a></li>
</ul>
<p><!-- Similar Posts took 3.874 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://anthonygthomas.com/2010/03/22/baseline-wordpress-theme-version-1-0-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No Flash Required</title>
		<link>http://anthonygthomas.com/2010/03/20/no-flash-required/</link>
		<comments>http://anthonygthomas.com/2010/03/20/no-flash-required/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 17:30:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[web develop]]></category>

		<guid isPermaLink="false">http://anthonygthomas.com/?p=421</guid>
		<description><![CDATA[I just added a pretty sweet bit of eye candy to my nav menu using strictly CSS &#38; JQuery. The method is here. The code is here. You do need to have a either a webKit or Mozilla browser for it to work properly. The point is that there are fewer and fewer things that [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-422" title="Navigation" src="http://anthonygthomas.com/wp-content/uploads/2010/03/nav.jpg" alt="JPEF of the nav menu from anthonygthomas.com" width="284" height="95" />I just added a pretty sweet bit of eye candy to my nav menu using strictly CSS &amp; JQuery. <a href="http://net.tutsplus.com/tutorials/html-css-techniques/how-to-build-a-lava-lamp-style-navigation-menu/" onclick="pageTracker._trackPageview('/outgoing/net.tutsplus.com/tutorials/html-css-techniques/how-to-build-a-lava-lamp-style-navigation-menu/?referer=');">The method is here</a>. <a href="http://github.com/JeffreyWay/SpasticNav" onclick="pageTracker._trackPageview('/outgoing/github.com/JeffreyWay/SpasticNav?referer=');">The code is here</a>.</p>
<p>You do need to have a either a webKit or Mozilla browser for it to work properly. The point is that there are fewer and fewer things that Flash can do that can&#8217;t be done with HTML, JavaScript and CSS. In fact, just about every single bit of animation I&#8217;ve had done in Flash over the last couple of years could be recreated with JQuery &amp; CSS3.</p>
<h3>UPDATE</h3>
<p>Since I couldn&#8217;t get the z-index to function properly in Internet Explorer, I used <a href="http://api.jquery.com/jQuery.browser/" onclick="pageTracker._trackPageview('/outgoing/api.jquery.com/jQuery.browser/?referer=');">JQuery&#8217;s .browser property</a> so the function only runs in supported browsers&#8211;namely, Mozilla or WebKit. The function actually degraded fairly well, except for Internet Explorer&#8217;s buggy handling of z-index. For reference, I&#8217;ve included my version of the plug-in because it has this and other subtle variations.<span id="more-421"></span></p>
<pre class="brush: jscript;">(function($) { 
	if ($.browser.webkit || $.browser.mozilla) {

		$.fn.spasticNav = function(options) {

			options = $.extend({
				overlap : 2,
				speed : 500,
				reset : 1500,
				color : '#BDD2FF',
				easing : 'easeOutExpo'
			}, options);

			return this.each(function() {

			 	var nav = $(this),
			 		currentPageItem = $('.current_page_item', nav),
			 		blob,
			 		reset;

			 	$('&lt;li id=&quot;blob&quot;&gt;&lt;/li&gt;').css({
			 		width : currentPageItem.outerWidth(),
			 		height : currentPageItem.outerHeight() + options.overlap,
			 		left : currentPageItem.position().left,
			 		top : currentPageItem.position().top - options.overlap / 2,
			 		backgroundColor : options.color
			 	}).appendTo(this);

				$('.current_page_item a').css('z-index', 1000);

			 	blob = $('#blob', nav);

				$('li:not(#blob)', nav).hover(function() {
					// mouse over
					clearTimeout(reset);
					blob.animate(
						{
							left : $(this).position().left,
							width : $(this).width()
						},
						{
							duration : options.speed,
							easing : options.easing,
							queue : false
						}
					);
				}, function() {
					// mouse out
					reset = setTimeout(function() {
						blob.animate({
							width : currentPageItem.outerWidth(),
							left : currentPageItem.position().left
						}, options.speed)
					}, options.reset);

				});

			}); // end each

		};

	}

})(jQuery);</pre>
<p><strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://anthonygthomas.com/2010/03/20/no-flash-required/" rel="bookmark" title="March 20, 2010">No Flash Required</a></li>
<li><a href="http://anthonygthomas.com/2009/11/09/blueprint-taking-a-close-look-at-grid-css/" rel="bookmark" title="November 9, 2009">Blueprint: Taking a Close Look at grid.css</a></li>
<li><a href="http://anthonygthomas.com/2010/02/08/introducing-the-baseline-development-wordpress-theme/" rel="bookmark" title="February 8, 2010">Introducing the Baseline Development WordPress Theme</a></li>
<li><a href="http://anthonygthomas.com/2010/03/14/display-form-fields-based-on-selection-using-jquery/" rel="bookmark" title="March 14, 2010">Display Form Fields Based on Selection Using JQuery</a></li>
<li><a href="http://anthonygthomas.com/2008/12/16/when-using-a-grid-layout-css-framework-do-the-math/" rel="bookmark" title="December 16, 2008">When Using a Grid Layout CSS Framework, Do the Math</a></li>
</ul>
<p><!-- Similar Posts took 5.208 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://anthonygthomas.com/2010/03/20/no-flash-required/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Display Form Fields Based on Selection Using JQuery</title>
		<link>http://anthonygthomas.com/2010/03/14/display-form-fields-based-on-selection-using-jquery/</link>
		<comments>http://anthonygthomas.com/2010/03/14/display-form-fields-based-on-selection-using-jquery/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 02:59:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[html forms jquery]]></category>

		<guid isPermaLink="false">http://anthonygthomas.com/?p=395</guid>
		<description><![CDATA[This is a simple method of showing and hiding form elements based on the user&#8217;s selection. It&#8217;s based on this article with a couple of very minor changes. (Dare I say, improvements?) I&#8217;m going to assume you&#8217;ve already included the JQuery library so I won&#8217;t cover that here. I want to go straight to the [...]]]></description>
			<content:encoded><![CDATA[<p>This is a simple method of showing and hiding form elements based on the user&#8217;s selection. <a href="http://minneapolis.craigslist.org/ram/tag/1642880912.html" onclick="pageTracker._trackPageview('/outgoing/minneapolis.craigslist.org/ram/tag/1642880912.html?referer=');">It&#8217;s based on this article</a> with a couple of very minor changes. (Dare I say, improvements?) I&#8217;m going to assume you&#8217;ve already included the JQuery library so I won&#8217;t cover that here. I want to go straight to the code. (<a href="http://anthonygthomas.com/examples/jquery-display-forms.html">View the example page here</a>.)<span id="more-395"></span></p>
<p>First, the form:</p>
<pre class="brush: xml;">&lt;form id=&quot;ExampleForm&quot; method=&quot;post&quot; action=&quot;#&quot;&gt;
	&lt;fieldset&gt;
		&lt;legend&gt;Questionnaire&lt;/legend&gt;
		&lt;div class=&quot;input select&quot;&gt;
			&lt;label for=&quot;select1&quot;&gt;Choose 1 to make the next select list appear.&lt;/label&gt;
			&lt;select name=&quot;select1&quot; id=&quot;select1&quot;&gt;
				&lt;option value=&quot;&quot;&gt;(choose one)&lt;/option&gt;
				&lt;option value=&quot;0&quot;&gt;0&lt;/option&gt;
				&lt;option value=&quot;1&quot;&gt;1&lt;/option&gt;
				&lt;option value=&quot;2&quot;&gt;2&lt;/option&gt;
				&lt;option value=&quot;3&quot;&gt;3&lt;/option&gt;
				&lt;option value=&quot;4&quot;&gt;4&lt;/option&gt;
				&lt;option value=&quot;5&quot;&gt;5&lt;/option&gt;
				&lt;option value=&quot;6&quot;&gt;6&lt;/option&gt;
				&lt;option value=&quot;7&quot;&gt;7&lt;/option&gt;
			&lt;/select&gt;
		&lt;/div&gt;
		&lt;div class=&quot;hide&quot; id=&quot;hide1&quot;&gt;&lt;!-- this select box will be hidden at first --&gt;
			&lt;div class=&quot;input select&quot;&gt;
				&lt;label for=&quot;select2&quot;&gt;Select &quot;Yes&quot; to make the next option appear.&lt;/label&gt;
				&lt;select name=&quot;select2&quot; id=&quot;select2&quot;&gt;
					&lt;option value=&quot;&quot;&gt;(choose one)&lt;/option&gt;
					&lt;option value=&quot;1&quot;&gt;Yes&lt;/option&gt;
					&lt;option value=&quot;0&quot;&gt;No&lt;/option&gt;
					&lt;option value=&quot;3&quot;&gt;Don&amp;#039;t Know&lt;/option&gt;
				&lt;/select&gt;
			&lt;/div&gt;
		&lt;/div&gt;
		&lt;div class=&quot;hide&quot; id=&quot;hide2&quot;&gt; &lt;!-- this one will also be hidden at first. --&gt;
			&lt;div class=&quot;input select&quot;&gt;
				&lt;label for=&quot;select3&quot;&gt;This is the last question.&lt;/label&gt;
				&lt;select name=&quot;select3&quot; id=&quot;select3&quot;&gt;
					&lt;option value=&quot;&quot;&gt;(choose one)&lt;/option&gt;
					&lt;option value=&quot;0&quot;&gt;0&lt;/option&gt;
					&lt;option value=&quot;1&quot;&gt;1&lt;/option&gt;
					&lt;option value=&quot;2&quot;&gt;2 to 5&lt;/option&gt;
					&lt;option value=&quot;3&quot;&gt;6 to 10&lt;/option&gt;
					&lt;option value=&quot;4&quot;&gt;&amp;gt;10&lt;/option&gt;
				&lt;/select&gt;
			&lt;/div&gt;
		&lt;/div&gt;
	&lt;/fieldset&gt;
	&lt;div class=&quot;submit&quot;&gt;
		&lt;input type=&quot;submit&quot; value=&quot;Save Answers&quot; /&gt;
	&lt;/div&gt;
&lt;/form&gt;</pre>
<p>Now make sure your &#8220;hide&#8221; css class is hidden:</p>
<pre class="brush: css;">.hide
{

	display:none;

}</pre>
<p>Now with the wonderful elegance of JQuery, we&#8217;ll tell the browser to display the hidden divs based on the user&#8217;s selection:</p>
<pre class="brush: jscript;">$(document).ready(function(){
	$(&quot;#select1&quot;).change(function(){

		if ($(this).val() == &quot;1&quot; ) {

			$(&quot;#hide1&quot;).slideDown(&quot;fast&quot;); //Slide Down Effect

		} else {

			$(&quot;#hide1&quot;).slideUp(&quot;fast&quot;);	//Slide Up Effect

		}
	});

	$(&quot;#select2&quot;).change(function(){

		if ($(this).val() == &quot;1&quot; ) {

			$(&quot;#hide2&quot;).slideDown(&quot;fast&quot;); //Slide Down Effect

		} else {

			$(&quot;#hide2&quot;).slideUp(&quot;fast&quot;);	//Slide Up Effect

		}
	});
});</pre>
<p>Let&#8217;s look at what&#8217;s happening here. First, we have a form with select boxes with ids &#8220;select1&#8243;, &#8220;select2&#8243; and &#8220;select3&#8243;. The last two are hidden by enclosing them in a div with our &#8220;hide&#8221; class. (Incidentally, Blueprint provides a &#8220;hide&#8221; class for you if you use that framework.)</p>
<p>Next we tell JQuery that as soon as &#8220;select1&#8243; is changed, we need to evaluate the new value. In this case, if the new value is &#8220;1&#8243;, we want to display the div with the id &#8220;hide1&#8243; <a href="http://api.jquery.com/slideDown/" onclick="pageTracker._trackPageview('/outgoing/api.jquery.com/slideDown/?referer=');">using JQuery&#8217;s slideDown effect</a>. We do this with <a href="http://api.jquery.com/change/" onclick="pageTracker._trackPageview('/outgoing/api.jquery.com/change/?referer=');">JQuery&#8217;s change event</a>.</p>
<pre class="brush: jscript;">$(&quot;#select1&quot;).change(function(){ // when #select1 changes

		if ($(this).val() == &quot;1&quot; ) { // see if the new value is &quot;1&quot;

			$(&quot;.hide1&quot;).slideDown(&quot;fast&quot;); // if it is &quot;1&quot;, display the .hide1 div with the slideDown effect

		} else {

			$(&quot;.hide1&quot;).slideUp(&quot;fast&quot;);	//otherwise, hide it with the slideUp effect

		}
	});</pre>
<p>Once &#8220;select2&#8243; is displayed, we can evaluate it to see if we need to display &#8220;select3&#8243; which is in a div with a &#8220;hide&#8221; class and &#8220;hide2&#8243; id.</p>
<pre class="brush: jscript;">$(&quot;#select2&quot;).change(function(){ // once select2 is changed

		if ($(this).val() == &quot;1&quot; ) { // see if the new value is &quot;1&quot;

			$(&quot;.hide2&quot;).slideDown(&quot;fast&quot;); // if it is, display the hide2 div using slideDown

		} else {

			$(&quot;.hide2&quot;).slideUp(&quot;fast&quot;);	// otherwise hide it using slideUp

		}
	});</pre>
<p>Remarkably simple really. <a href="http://anthonygthomas.com/examples/jquery-display-forms.html">Review the working example and code here</a>.</p>
<p><strong>Update (March 15, 2010)</strong></p>
<p>You also could show/hide a single form element by id rather than enclose them in a div. I enclosed them in a div 1.) so I could hide the label and 2.) because in my application where I use this solution, I&#8217;m actually hiding a whole group of fields.</p>
<h3>Resources</h3>
<ul>
<li><a href="http://api.jquery.com/change/" onclick="pageTracker._trackPageview('/outgoing/api.jquery.com/change/?referer=');">JQuery change() Event</a></li>
<li><a href="http://api.jquery.com/val/" onclick="pageTracker._trackPageview('/outgoing/api.jquery.com/val/?referer=');">JQuery val()</a></li>
<li><a href="http://api.jquery.com/slideDown/" onclick="pageTracker._trackPageview('/outgoing/api.jquery.com/slideDown/?referer=');">JQuery slideDown Effect</a></li>
<li><a href="http://api.jquery.com/slideUp/" onclick="pageTracker._trackPageview('/outgoing/api.jquery.com/slideUp/?referer=');">JQuery slideUp Effect</a></li>
</ul>
<p><strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://anthonygthomas.com/2010/03/14/display-form-fields-based-on-selection-using-jquery/" rel="bookmark" title="March 14, 2010">Display Form Fields Based on Selection Using JQuery</a></li>
<li><a href="http://anthonygthomas.com/2010/02/14/why-use-blueprint-and-the-960-grid-system-in-the-baseline-theme/" rel="bookmark" title="February 14, 2010">Why Use Blueprint and the 960 Grid System in the Baseline Theme?</a></li>
<li><a href="http://anthonygthomas.com/2009/07/22/simple-security-in-cakephp/" rel="bookmark" title="July 22, 2009">Simple Security in CakePHP</a></li>
<li><a href="http://anthonygthomas.com/2010/03/20/no-flash-required/" rel="bookmark" title="March 20, 2010">No Flash Required</a></li>
<li><a href="http://anthonygthomas.com/2008/11/22/blueprint-css-tutorial-file/" rel="bookmark" title="November 22, 2008">Blueprint CSS Tutorial File</a></li>
</ul>
<p><!-- Similar Posts took 4.799 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://anthonygthomas.com/2010/03/14/display-form-fields-based-on-selection-using-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing the Baseline Development WordPress Theme</title>
		<link>http://anthonygthomas.com/2010/02/08/introducing-the-baseline-development-wordpress-theme/</link>
		<comments>http://anthonygthomas.com/2010/02/08/introducing-the-baseline-development-wordpress-theme/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 01:53:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blueprint Framework]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[themes]]></category>

		<guid isPermaLink="false">http://anthonygthomas.com/?p=233</guid>
		<description><![CDATA[I&#8217;ve come up with some habits that I&#8217;ve developed from building themes for WordPress over the years. One, is to start with a nearly blank style sheet. I also like to hook in several JavaScript libraries and CSS frameworks from the start to take advantage of things like JQuery, Blueprint&#8217;s CSS reset and Superfish menus. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve come up with some habits that I&#8217;ve developed from building themes for WordPress over the years. One, is to start with a nearly blank style sheet. I also like to hook in several JavaScript libraries and CSS frameworks from the start to take advantage of things like JQuery, Blueprint&#8217;s CSS reset and Superfish menus.<span id="more-233"></span></p>
<p>I&#8217;ve decided to build and release an XHTML 1.0 version and release it as a springboard for others who may want to take advantage of the same sets of tools. The theme isn&#8217;t much to look at (that&#8217;s the point), but it includes:</p>
<ul>
<li><a href="http://blueprintcss.org/" onclick="pageTracker._trackPageview('/outgoing/blueprintcss.org/?referer=');">Blueprint CSS framework</a></li>
<li><a href="http://blueprintcss.org/" onclick="pageTracker._trackPageview('/outgoing/blueprintcss.org/?referer=');"></a><a href="http://960.gs/" onclick="pageTracker._trackPageview('/outgoing/960.gs/?referer=');">960 Grid System</a></li>
<li><a href="http://960.gs/" onclick="pageTracker._trackPageview('/outgoing/960.gs/?referer=');"></a><a href="http://jquery.com/" onclick="pageTracker._trackPageview('/outgoing/jquery.com/?referer=');">JQuery 1.4.0</a></li>
<li><a href="http://jqueryui.com/" onclick="pageTracker._trackPageview('/outgoing/jqueryui.com/?referer=');">JQuery UI 1.7.1</a></li>
<li><a href="http://jquery.com/" onclick="pageTracker._trackPageview('/outgoing/jquery.com/?referer=');"></a><a href="http://users.tpg.com.au/j_birch/plugins/superfish/" onclick="pageTracker._trackPageview('/outgoing/users.tpg.com.au/j_birch/plugins/superfish/?referer=');">Superfish JQuery menu</a> (with <a href="http://cherne.net/brian/resources/jquery.hoverIntent.html" onclick="pageTracker._trackPageview('/outgoing/cherne.net/brian/resources/jquery.hoverIntent.html?referer=');">HoverIntent.js</a>)</li>
<li><a href="http://code.google.com/p/ie7-js/" onclick="pageTracker._trackPageview('/outgoing/code.google.com/p/ie7-js/?referer=');">IE8 JavaScript Library</a></li>
<li><a href="http://users.tpg.com.au/j_birch/plugins/superfish/" onclick="pageTracker._trackPageview('/outgoing/users.tpg.com.au/j_birch/plugins/superfish/?referer=');"></a>Widget-enabled sidebar</li>
<li><a href="http://wpcandy.com/articles/easier-theme-development-with-the-sample-post-collection.html" onclick="pageTracker._trackPageview('/outgoing/wpcandy.com/articles/easier-theme-development-with-the-sample-post-collection.html?referer=');">Test Content file from WP-Candy</a></li>
<li><a href="http://validator.w3.org/check?uri=http%3A%2F%2Fbaseline.truetoneenterprises.com%2F" onclick="pageTracker._trackPageview('/outgoing/validator.w3.org/check?uri=http_3A_2F_2Fbaseline.truetoneenterprises.com_2F&amp;referer=');">Valid XHTML 1.0</a></li>
</ul>
<p><a href="http://baseline.truetoneenterprises.com" onclick="pageTracker._trackPageview('/outgoing/baseline.truetoneenterprises.com?referer=');">More information here</a>.</p>
<p>If you want to use all of these tools, you&#8217;re all set. If you want to use a few, it&#8217;s just a matter of removing them from header.php.</p>
<p>First off, I really like Blueprint&#8217;s browser reset, so I wanted to include that here. I also like the flexibility the 960 Grid System offers in terms of column width. As a result, I&#8217;ve included them both.</p>
<pre class="brush: php; first-line: 9; html-script: true;">&lt;link rel=&quot;stylesheet&quot; href=&quot;&lt;?php bloginfo('stylesheet_directory'); ?&gt;/blueprint/screen.css&quot; type=&quot;text/css&quot; media=&quot;screen, projection&quot; /&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;&lt;?php bloginfo('stylesheet_directory'); ?&gt;/960.css&quot; type=&quot;text/css&quot; media=&quot;screen, projection&quot; /&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;&lt;?php bloginfo('stylesheet_directory'); ?&gt;/blueprint/print.css&quot; type=&quot;text/css&quot; media=&quot;print&quot; /&gt;</pre>
<p>If you don&#8217;t wish to use any of these, simply remove them from header.php. Next up is the Superfish CSS:</p>
<pre class="brush: php; first-line: 12; html-script: true;">&lt;link rel=&quot;stylesheet&quot; href=&quot;&lt;?php bloginfo('stylesheet_directory'); ?&gt;/superfish/css/superfish.css&quot; type=&quot;text/css&quot; media=&quot;screen, projection&quot; /&gt;</pre>
<p>You must keep this if you&#8217;re using Superfish. If you&#8217;re not going to use Superfish, you should remove these lines too:</p>
<pre class="brush: php; first-line: 29; html-script: true;">&lt;script type=&quot;text/javascript&quot; src=&quot;&lt;?php bloginfo('stylesheet_directory'); ?&gt;/superfish/js/superfish.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;&lt;?php bloginfo('stylesheet_directory'); ?&gt;/superfish/js/hoverIntent.js&quot;&gt;&lt;/script&gt;</pre>
<pre class="brush: jscript; first-line: 32; html-script: true;">&lt;script type=&quot;text/javascript&quot;&gt;

    $(document).ready(function() {
        $('ul.sf-menu').superfish();
    });

&lt;/script&gt;</pre>
<p>Next is Blueprint&#8217;s Internet Explorer CSS reset:</p>
<pre class="brush: php; first-line: 13; html-script: true;">&lt;!--[if IE]&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;&lt;?php bloginfo('stylesheet_directory'); ?&gt;/blueprint/ie.css&quot; type=&quot;text/css&quot; media=&quot;screen, projection&quot; /&gt;
&lt;![endif] --&gt;</pre>
<p>I&#8217;ve also had good luck using the IE8 JavaScript library, so that&#8217;s included next:</p>
<pre class="brush: xml; first-line: 17;">&lt;!--[if lt IE 8]&gt;
&lt;script src=&quot;http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE8.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;![endif]--&gt;</pre>
<p>Then JQuery and JQuery UI libraries:</p>
<pre class="brush: xml; first-line: 21;">&lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/jquery-ui.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;</pre>
<p>That&#8217;s it. All the frameworks and libraries are loaded. If you don&#8217;t think you&#8217;ll need any one of them, you can just take them out. WARNING: The layout of the columns does rely on the 960 Grid System CSS file. If you take that out of the head the columns won&#8217;t work and you&#8217;ll break the layout.</p>
<p>Otherwise this should give you a good start that will allow you to take advantage of tons of cool JQuery stuff and leverages a very popular CSS Grid System for laying out columns. It should be easy to modify this theme to fit your own design.</p>
<p><a href="http://baseline.truetoneenterprises.com" onclick="pageTracker._trackPageview('/outgoing/baseline.truetoneenterprises.com?referer=');">Download the theme here</a>.<strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://anthonygthomas.com/2010/02/08/introducing-the-baseline-development-wordpress-theme/" rel="bookmark" title="February 8, 2010">Introducing the Baseline Development WordPress Theme</a></li>
<li><a href="http://anthonygthomas.com/2008/11/23/incorporating-blueprint-css-into-your-new-wordpress-theme/" rel="bookmark" title="November 23, 2008">Incorporating Blueprint CSS Into Your New WordPress Theme</a></li>
<li><a href="http://anthonygthomas.com/2010/02/16/baseline-theme-version-1-0-1/" rel="bookmark" title="February 16, 2010">Baseline Theme Version 1.0.1</a></li>
<li><a href="http://anthonygthomas.com/2008/11/26/getting-blueprint-css-javascript-libraries-into-your-cakephp-layout/" rel="bookmark" title="November 26, 2008">Getting Blueprint CSS &#038; JavaScript Libraries Into Your CakePHP Layout</a></li>
<li><a href="http://anthonygthomas.com/2008/11/22/blueprint-css-readme-file/" rel="bookmark" title="November 22, 2008">Blueprint CSS Readme File</a></li>
</ul>
<p><!-- Similar Posts took 4.688 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://anthonygthomas.com/2010/02/08/introducing-the-baseline-development-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Blueprint CSS &amp; JavaScript Libraries Into Your CakePHP Layout</title>
		<link>http://anthonygthomas.com/2008/11/26/getting-blueprint-css-javascript-libraries-into-your-cakephp-layout/</link>
		<comments>http://anthonygthomas.com/2008/11/26/getting-blueprint-css-javascript-libraries-into-your-cakephp-layout/#comments</comments>
		<pubDate>Wed, 26 Nov 2008 19:55:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blueprint Framework]]></category>
		<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[libraries]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://anthonygthomas.com/?p=59</guid>
		<description><![CDATA[Updated 12/3/2008 The other day I wrote about getting the Blueprint CSS framework into your WordPress theme. If you&#8217;re developing in CakePHP, it&#8217;s even easier to link multiple style sheets and JavaScript libraries to your layout file. &#60;?php $css = array('blueprint/screen', 'blueprint/ie', 'style'); $jslibraries = array('prototype', 'scriptaculous', 'jquery'); echo $html-&#62;css('blueprint/print', 'stylesheet', 'media="print"'); echo $html-&#62;css($css, 'stylesheet', [...]]]></description>
			<content:encoded><![CDATA[<p>Updated 12/3/2008</p>
<p>The other day I wrote about <a href="http://anthonygthomas.com/2008/11/23/incorporating-blueprint-css-into-your-new-wordpress-theme/">getting the Blueprint CSS framework into your WordPress theme</a>. If you&#8217;re developing in <a href="http://cakephp.org" onclick="pageTracker._trackPageview('/outgoing/cakephp.org?referer=');">CakePHP</a>, it&#8217;s even easier to link multiple style sheets and JavaScript libraries to your <a href="http://book.cakephp.org/view/96/Layouts" onclick="pageTracker._trackPageview('/outgoing/book.cakephp.org/view/96/Layouts?referer=');">layout file</a>.</p>
<p><code>&lt;?php</code></p>
<p><code>$css = array('blueprint/screen', 'blueprint/ie', 'style');<br />
$jslibraries = array('prototype', 'scriptaculous', 'jquery');</code><code><span style="text-decoration: line-through;"><br />
</span>echo $html-&gt;css('blueprint/print', 'stylesheet', 'media="print"');</code><code><br />
echo $html-&gt;css($css, 'stylesheet', 'media=”screen, projection”');<br />
echo $javascript-&gt;link($jslibraries);</code><br />
<code>?&gt;</code></p>
<p>Let&#8217;s take these one at a time.</p>
<p><code>$css = array('blueprint/screen', 'blueprint/ie', 'style');</code></p>
<p><a href="http://book.cakephp.org/view/205/HTML" onclick="pageTracker._trackPageview('/outgoing/book.cakephp.org/view/205/HTML?referer=');">CakePHP&#8217;s html helper</a> will load any css file you specify. First, make sure the css files are in <code>app/webroot/css</code>. Then put any css files you want to link to your layout in an array like I have above. You might have noticed that I didn&#8217;t include print in my array. That&#8217;s because we want to add an media=&#8221;print&#8221; as a separate attribute that the other style sheets won&#8217;t have.</p>
<p>Once they&#8217;re loaded into your array, simply put <code>echo $html-&gt;css($css);</code> in the head of your layout. The output will be:<br />
<code>&lt;link rel="stylesheet" type="text/css" href="/app/webroot/css/blueprint/screen.css" /&gt;<br />
&lt;link rel="stylesheet" type="text/css" href="/app/webroot/css/blueprint/ie.css" /&gt;<br />
&lt;link rel="stylesheet" type="text/css" href="/app/webroot/css/style.css" /&gt;</code></p>
<p>We still haven&#8217;t linked our print style sheet. Make sure you link the print style sheet above the others so they override it. We can add <code>media="print"</code> by putting this into our layout head:</p>
<p><code>echo $html-&gt;css('blueprint/print', 'stylesheet', 'media="print"');</code></p>
<p>So now:</p>
<p><code>$css = array('blueprint/screen', 'blueprint/ie', 'style');<br />
</code><code>echo $html-&gt;css('blueprint/print', 'stylesheet', 'media="print"');</code><code><br />
</code><code>echo $html-&gt;css($css, 'stylesheet', 'media=”screen, projection”');</code></p>
<p>Results in:</p>
<p><code>&lt;link rel="stylesheet" type="text/css" href="/cvp-msi/https/app/webroot/css/blueprint/print.css" media="print" /&gt;<br />
&lt;link rel="stylesheet" type="text/css" href="/cvp-msi/https/app/webroot/css/blueprint/screen.css" media="screen, projection" /&gt;<br />
&lt;link rel="stylesheet" type="text/css" href="/cvp-msi/https/app/webroot/css/blueprint/ie.css" media="screen, projection" /&gt;<br />
&lt;link rel="stylesheet" type="text/css" href="/cvp-msi/https/app/webroot/css/style.css" media="screen, projection" /&gt;</code></p>
<p>Two things to note. In <code>$html-&gt;css($path, $attributes)</code>, the first argument is the path from <code>app/webroot/css</code>. The second argument is html attributes.</p>
<p>Linking JavaScript libraries is very similar.</p>
<p><code>$jslibraries = array('prototype', 'scriptaculous', 'jquery');</code></p>
<p>This will link to <code>prototype.js</code>, <code>scriptaculous.js</code> and <code>jquery.js</code> respectively as long as there in <code>app/webroot/js</code>.</p>
<p>Put <code>echo $javascript-&gt;link($jslibraries);</code> into the head of your layout and you&#8217;re done. You have all three JavaScript libraries at your disposal.</p>
<p>Other good resources:</p>
<ul>
<li><a href="http://book.cakephp.org/view/181/Core-Helpers" onclick="pageTracker._trackPageview('/outgoing/book.cakephp.org/view/181/Core-Helpers?referer=');">CakePHP Core Helpers</a></li>
<li><a href="http://book.cakephp.org/view/27/Developing-with-CakePHP" onclick="pageTracker._trackPageview('/outgoing/book.cakephp.org/view/27/Developing-with-CakePHP?referer=');">Developing With CakePHP</a></li>
<li><a href="http://api.cakephp.org/class_javascript_helper.html#cab1eb59cacd608ec02e79cfd8710094" onclick="pageTracker._trackPageview('/outgoing/api.cakephp.org/class_javascript_helper.html_cab1eb59cacd608ec02e79cfd8710094?referer=');">CakePHP API JavaScript link Helper</a></li>
<li><a href="http://api.cakephp.org/class_html_helper.html#b8e7fe2bca7be4c25f9a660038131f00" onclick="pageTracker._trackPageview('/outgoing/api.cakephp.org/class_html_helper.html_b8e7fe2bca7be4c25f9a660038131f00?referer=');">CakePHP API CSS link Helper</a></li>
</ul>
<p><strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://anthonygthomas.com/2008/11/26/getting-blueprint-css-javascript-libraries-into-your-cakephp-layout/" rel="bookmark" title="November 26, 2008">Getting Blueprint CSS &#038; JavaScript Libraries Into Your CakePHP Layout</a></li>
<li><a href="http://anthonygthomas.com/2008/11/23/incorporating-blueprint-css-into-your-new-wordpress-theme/" rel="bookmark" title="November 23, 2008">Incorporating Blueprint CSS Into Your New WordPress Theme</a></li>
<li><a href="http://anthonygthomas.com/2010/02/08/introducing-the-baseline-development-wordpress-theme/" rel="bookmark" title="February 8, 2010">Introducing the Baseline Development WordPress Theme</a></li>
<li><a href="http://anthonygthomas.com/2008/11/22/blueprint-css-readme-file/" rel="bookmark" title="November 22, 2008">Blueprint CSS Readme File</a></li>
<li><a href="http://anthonygthomas.com/2010/02/16/baseline-theme-version-1-0-1/" rel="bookmark" title="February 16, 2010">Baseline Theme Version 1.0.1</a></li>
</ul>
<p><!-- Similar Posts took 4.785 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://anthonygthomas.com/2008/11/26/getting-blueprint-css-javascript-libraries-into-your-cakephp-layout/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
