<?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>MoonKat Creations &#187; jQuery</title>
	<atom:link href="http://www.moonkatcreations.com/category/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.moonkatcreations.com</link>
	<description>Not just another WordPress blog about web design</description>
	<lastBuildDate>Tue, 27 Jul 2010 04:50:06 +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>Forward/Next Script for jQuery Tools Tabs</title>
		<link>http://www.moonkatcreations.com/web-design/jquery/forwardnext-script-for-jquery-tools-tabs/</link>
		<comments>http://www.moonkatcreations.com/web-design/jquery/forwardnext-script-for-jquery-tools-tabs/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 21:07:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.moonkatcreations.com/?p=292</guid>
		<description><![CDATA[Make forward and next buttons or links on each tab view. In the rel tags of each button, place the id of the tab that would be next or before in the sequence.]]></description>
			<content:encoded><![CDATA[<p>Make forward and next buttons or links on each tab view. In the rel tags of each button, place the id of the tab that would be next or before in the sequence.</p>
<p><code>&lt;button rel="#tab1"&gt;&amp;nbsp;&lt;/button&gt;<br />
&lt;button rel="#tab3"&gt;&amp;nbsp;&lt;/button&gt;</code></p>
<p>Then, use this handy little script:</p>
<p><code>$('.nav_arrow').click(function () {<br />
var nextPage = $(this).attr('rel');<br />
$(nextPage).click();<br />
return false;<br />
});</code></p>
<p>Effectively, you are telling the forward or next button that if it&#8217;s clicked, cause the corresponding tab to be clicked, opening that view.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.moonkatcreations.com/web-design/jquery/forwardnext-script-for-jquery-tools-tabs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Clearfields Plugin</title>
		<link>http://www.moonkatcreations.com/web-design/jquery/jquery-clearfields-plugin/</link>
		<comments>http://www.moonkatcreations.com/web-design/jquery/jquery-clearfields-plugin/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 20:06:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.moonkatcreations.com/?p=286</guid>
		<description><![CDATA[It's easy to implement. Download clearfield.js and link it into your page. Then place the class "clearField" on all your inputs, selects, and textareas. Instantiate the function in your custom javascript page with this:]]></description>
			<content:encoded><![CDATA[<p>This is not the one mentioned on jQuery.com (<a href="http://plugins.jquery.com/project/clearField)">http://plugins.jquery.com/project/clearField)</a>. However, this may have been inspired by it. I can&#8217;t remember where this plugin came from, to be totally honest. It was possibly written by my ex-coworker Nathan. Any-who, if the author steps forward, I will be glad to attribute it.</p>
<p>It&#8217;s easy to implement. Download <a title="Go to clearfield.js" href="http://docs.google.com/leaf?id=0B4rh0uE53CoyYTRlODRhNzEtMjkxMC00NTA1LTlkYzMtNGZhYzA2NDNlZWFm&amp;hl=en&amp;authkey=CKPF1Bg" target="_blank">clearfield.js</a> and link it into your page. Then place the class &#8220;clearField&#8221; on all your inputs, selects, and textareas. Instantiate the function in your custom javascript page with this:</p>
<p><code>$('.clearField').clearField();</code></p>
<p>If you don&#8217;t have access to the form element markup, or you are using a framework, a little bit of jQuery can be used to add the necessary classes:</p>
<p><code>$('input, select').addClass('clearField');</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.moonkatcreations.com/web-design/jquery/jquery-clearfields-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Striping for Table Rows</title>
		<link>http://www.moonkatcreations.com/web-design/jquery/jquery-striping-for-table-rows/</link>
		<comments>http://www.moonkatcreations.com/web-design/jquery/jquery-striping-for-table-rows/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 20:05:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.moonkatcreations.com/?p=279</guid>
		<description><![CDATA[A simple script to select, and then add striping to table rows:
$(&#8216;tr:odd td&#8217;).css(&#8216;background&#8217;,'#yourcolor&#8217;);
]]></description>
			<content:encoded><![CDATA[<p>A simple script to select, and then add striping to table rows:</p>
<p>$(&#8216;tr:odd td&#8217;).css(&#8216;background&#8217;,'#yourcolor&#8217;);</p>
]]></content:encoded>
			<wfw:commentRss>http://www.moonkatcreations.com/web-design/jquery/jquery-striping-for-table-rows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Option Values from a Select</title>
		<link>http://www.moonkatcreations.com/web-design/jquery/get-option-values-from-a-select/</link>
		<comments>http://www.moonkatcreations.com/web-design/jquery/get-option-values-from-a-select/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 23:35:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.moonkatcreations.com/?p=255</guid>
		<description><![CDATA[This is an easy way to grab all the option values from any regular html select, and print them to your Firebug console as a comma separated list.]]></description>
			<content:encoded><![CDATA[<p>This is an easy way to grab all the option values from any regular html select, and print them to your Firebug console as a comma separated list. (I found this useful when I needed to grab the state names listed on a previous version of a company website.)</p>
<p><code><br />
var newArray = [];<br />
var list = $('#selectID').find('option');<br />
for(var i = 0; i &lt; list.length; i++) {<br />
newArray[i] = list[i].text;<br />
}<br />
console.log(newArray.join(", "));<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.moonkatcreations.com/web-design/jquery/get-option-values-from-a-select/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Super Easy jQuery Accordion Menu</title>
		<link>http://www.moonkatcreations.com/web-design/html/super-easy-jquery-accordion-menu/</link>
		<comments>http://www.moonkatcreations.com/web-design/html/super-easy-jquery-accordion-menu/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 22:17:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[accordion menu]]></category>
		<category><![CDATA[navigation]]></category>

		<guid isPermaLink="false">http://www.moonkatcreations.com/?p=228</guid>
		<description><![CDATA[I created this accordion menu rather on accident. (See my previous post, ). I was actually writing jQuery to make a show/hide question answer list, and realized it would be really easy to turn it into an accordion menu.

Here's the result:]]></description>
			<content:encoded><![CDATA[<p>I created this accordion menu rather on accident. (See my previous post, ). I was actually writing jQuery to make a show/hide question answer list, and realized it would be really easy to turn it into an accordion menu.</p>
<p>Here&#8217;s the result:</p>
<ul id="accordian_menu">
<li><a class="toggleLink" href="#">Our Company</a>
<ul class="hidden">
<li><a href="#">About Us</a></li>
<li><a href="#">History</a></li>
</ul>
</li>
<li><a class="toggleLink" href="#">Products/Services</a>
<ul class="hidden">
<li><a href="#">Custom Web Design</a></li>
<li><a href="#">Content Management Solutions</a></li>
<li><a href="#">Website Optimization</a></li>
<li><a href="#">Email Campaigns</a></li>
</ul>
</li>
<li><a class="toggleLink" href="#">Portfolio</a>
<ul class="hidden">
<li><a href="#">Static HTML</a></li>
<li><a href="#">Wordpress Themes</a></li>
<li><a href="#">Emails</a></li>
</ul>
</li>
<li><a class="toggleLink" href="#">Contact</a>
<ul class="hidden">
<li><a href="#">Phone</a></li>
<li><a href="#">Email</a></li>
<li><a href="#">Request a Quote</a></li>
</ul>
</li>
</ul>
<p>How to create it:</p>
<p>1. Include the jQuery library in your page with a script tag. Example:</p>
<pre>&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/
jquery/1.3.2/jquery.min.js"&gt;&lt;/script&gt;</pre>
<p>This example links directly to the jQuery library hosted on google. You may link to your own copy.</p>
<p>2. Create a new .js document, and add this code:</p>
<pre>$(document).ready(function(){
	$("ul.hidden").hide();
	$("a.toggleLink").click(function () {
		$("ul.hidden").not($(this).next("ul:first")).slideUp();
		$(this).next("ul:first").slideToggle("normal");
	});
});</pre>
<p>Add this file using the &lt;script&gt; tag.</p>
<p>3. Add this to the body of your page:</p>
<pre>&lt;ul id="accordian_menu"&gt;

     &lt;li&gt;&lt;a href="#" class="toggleLink"&gt;Our Company&lt;/a&gt;

     &lt;ul class="hidden"&gt;

     &lt;li&gt;&lt;a href="#"&gt;About Us&lt;/a&gt;&lt;/li&gt;

     &lt;li&gt;&lt;a href="#"&gt;History&lt;/a&gt;&lt;/li&gt;

     &lt;/ul&gt;

     &lt;/li&gt;

     &lt;li&gt;&lt;a href="#" class="toggleLink"&gt;Products/Services&lt;/a&gt;

     &lt;ul class="hidden"&gt;

     &lt;li&gt;&lt;a href="#"&gt;Custom Web Design&lt;/a&gt;&lt;/li&gt;

     &lt;li&gt;&lt;a href="#"&gt;Content Management Solutions&lt;/a&gt;&lt;/li&gt;

     &lt;li&gt;&lt;a href="#"&gt;Website Optimization&lt;/a&gt;&lt;/li&gt;

     &lt;li&gt;&lt;a href="#"&gt;Email Campaigns&lt;/a&gt;&lt;/li&gt;

     &lt;/ul&gt;

     &lt;/li&gt;

     &lt;li&gt;&lt;a href="#" class="toggleLink"&gt;Portfolio&lt;/a&gt;

     &lt;ul class="hidden"&gt;

     &lt;li&gt;&lt;a href="#"&gt;Static HTML&lt;/a&gt;&lt;/li&gt;

     &lt;li&gt;&lt;a href="#"&gt;Wordpress Themes&lt;/a&gt;&lt;/li&gt;

     &lt;li&gt;&lt;a href="#"&gt;Emails&lt;/a&gt;&lt;/li&gt;

     &lt;/ul&gt;

     &lt;/li&gt;

     &lt;li&gt;&lt;a href="#" class="toggleLink"&gt;Contact&lt;/a&gt;

     &lt;ul class="hidden"&gt;

     &lt;li&gt;&lt;a href="#"&gt;Phone&lt;/a&gt;&lt;/li&gt;

     &lt;li&gt;&lt;a href="#"&gt;Email&lt;/a&gt;&lt;/li&gt;

     &lt;li&gt;&lt;a href="#"&gt;Request a Quote&lt;/a&gt;&lt;/li&gt;

     &lt;/ul&gt;

     &lt;/li&gt;

&lt;/ul&gt;</pre>
<p>4. Add these classes to your stylesheet:</p>
<pre>a {
	text-decoration: none;
}
a.toggleLink {
	display: block;
	padding: 5px;
	background: #936;
	color: white;
	border-bottom:1px dotted #CC99CC;
	}
ul#accordian_menu {
	margin: 0;
	padding: 0;
	width: 150px;
}
ul#accordian_menu li {
	list-style-type: none;
}
ul#accordian_menu li ul {
	padding-left: 0;
	background: #FFDAEE;
}
ul#accordian_menu li ul li {
}
ul#accordian_menu li ul li a:hover {
	background: white;
}
ul#accordian_menu li ul li a {
	color: #936;
	display: block;
	border-bottom: 1px dotted #C9C;
	padding: 5px;
}</pre>
<p>These classes could probably be refined a little, but I kept them pretty specific so they won&#8217;t conflict with any similar markup that might be in your page. Feel free to rename or change them to suit your needs.</p>
<p><strong>Take it further:</strong></p>
<ul>
<li>Use divs or paragraphs instead of list items to make a show/hide section of content.</li>
<li>If static (non-sliding content) will be wedged anywhere between your sliding elements, you must use the .nextAll() method, instead of .next().</li>
</ul>
<p>Note: If you&#8217;re new to jQuery, you only need to include the $(document).ready(function()) once in your javascript document&#8211;wrap it around all of your functions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.moonkatcreations.com/web-design/html/super-easy-jquery-accordion-menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding jQuery to Wordpress</title>
		<link>http://www.moonkatcreations.com/web-design/jquery/adding-jquery-to-wordpress/</link>
		<comments>http://www.moonkatcreations.com/web-design/jquery/adding-jquery-to-wordpress/#comments</comments>
		<pubDate>Sat, 15 Aug 2009 00:11:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.moonkatcreations.com/?p=217</guid>
		<description><![CDATA[You could add your custom jQuery to Wordpress by using the script tag in your head template, but this method can cause conflicts with JavaScript in other Wordpress plugins.

Instead, use the wp_enqueue_script, the Wordpress-friendly method. You will need direct access to your Wordpress files.]]></description>
			<content:encoded><![CDATA[<p>You <em>could</em> add your custom jQuery to Wordpress by using the script tag in your head template, but this method can cause conflicts with JavaScript in other Wordpress plugins.</p>
<p>Instead, use the wp_enqueue_script, the Wordpress-friendly method. You will need direct access to your Wordpress files.</p>
<ol>
<li>Go into wp-content/plugins, and create a new javascript folder.</li>
<li>In this folder, place your .js file.</li>
<li>In header.php, before &lt;?php wp_head(); ?&gt;, place this:</li>
</ol>
<pre>&lt;?php
wp_enqueue_script('custom',
'/' . PLUGINDIR . '/javascript/yourscript.js',
array('jquery'),
'1.0' );
?&gt;</pre>
<p>That&#8217;s it. You don&#8217;t need to do anything additional to include the jQuery library, since it&#8217;s specified as in the array as a file that your script is dependent upon. In place of &#8216;jquery&#8217; you can use Scriptaculous, jQuery UI Tabs, or any number of libraries that are built into Wordpress.</p>
<p>Those libraries, as well as additional information about the wp_enqueue_script can be found at <a href="http://codex.wordpress.org/Function_Reference/wp_enqueue_script">codex.wordpress.org/Function_Reference/wp_enqueue_script</a>.</p>
<p>According to the codex, this script can&#8217;t be placed above &lt;?php wp_head(); ?&gt;, but I&#8217;ve found that on the contrary, it works ONLY when placed above it. This same page of the codex also says that &#8216;$&#8217; can be used instead of &#8216;jQuery&#8217; inside the document ready function, which is also currently not accurate.</p>
<p>In other words, where you would use &#8216;$&#8217; in your jQuery function, you MUST use &#8216;jQuery&#8217; for every instance, not just in the document ready function. Feel free to test this with your own script; I&#8217;m not sure why the Codex is wrong on these points.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.moonkatcreations.com/web-design/jquery/adding-jquery-to-wordpress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Show/hide function for questions and answers</title>
		<link>http://www.moonkatcreations.com/web-design/jquery/showhide-function-for-questions-and-answers/</link>
		<comments>http://www.moonkatcreations.com/web-design/jquery/showhide-function-for-questions-and-answers/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 22:15:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[accordion navigation]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[toggle]]></category>

		<guid isPermaLink="false">http://www.moonkatcreations.com/?p=57</guid>
		<description><![CDATA[Here&#8217;s a neat little script that allows a question and answer type format, where the questions are all listed as links, and clicking on one toggles the visibility of the corresponding answer.
$("p").hide();
$("a").click(function () {
$(this).next("p:first").slideToggle("fast");
});
Here&#8217;s a version for lists that can be used to build an accordion navigation menu:
$("ul li ul").hide();
$("a").click(function () {
$(this).next("ul:first").slideToggle("fast");
});
Thanks to this post [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a neat little script that allows a question and answer type format, where the questions are all listed as links, and clicking on one toggles the visibility of the corresponding answer.</p>
<pre>$("p").hide();
$("a").click(function () {
$(this).next("p:first").slideToggle("fast");
});</pre>
<p>Here&#8217;s a version for lists that can be used to build an accordion navigation menu:</p>
<pre>$("ul li ul").hide();
$("a").click(function () {
$(this).next("ul:first").slideToggle("fast");
});</pre>
<p>Thanks to this post on Stackoverflow for the inspiration:</p>
<p>http://stackoverflow.com/questions/248320/using-this-with-jquery-selectors/248335</p>
<p>My selectors allow you to have multiple questions listed on one page. The answers given to the question on Stackoverflow only allowed for one, since, if clicked, it would toggle ALL of the paragraphs simultaneously.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.moonkatcreations.com/web-design/jquery/showhide-function-for-questions-and-answers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Variables in JQuery Selectors</title>
		<link>http://www.moonkatcreations.com/web-design/jquery/using-variables-in-jquery-selectors/</link>
		<comments>http://www.moonkatcreations.com/web-design/jquery/using-variables-in-jquery-selectors/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 20:57:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://blog.moonkatcreations.com/?p=21</guid>
		<description><![CDATA[If you want to use variables in combination with CSS-style selectors like so:
$("#navigation a.myHomePage, " + logo).hover(function() {
$("li.home").addClass("homeRoll");
}, (function() {
$("li.home").removeClass("homeRoll");
});
Make sure your variable homePageImage is written as a string:
var homePageImage = "#logo"
not an object:
var homePageImage = $("#logo")
or it won&#8217;t work.
]]></description>
			<content:encoded><![CDATA[<p>If you want to use variables in combination with CSS-style selectors like so:</p>
<pre>$("#navigation a.myHomePage, " + logo).hover(function() {
$("li.home").addClass("homeRoll");
}, (function() {
$("li.home").removeClass("homeRoll");
});</pre>
<p>Make sure your variable homePageImage is written as a string:</p>
<pre>var homePageImage = "#logo"</pre>
<p>not an object:</p>
<pre>var homePageImage = $("#logo")</pre>
<p>or it won&#8217;t work.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.moonkatcreations.com/web-design/jquery/using-variables-in-jquery-selectors/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using JQuery Tools Tabs</title>
		<link>http://www.moonkatcreations.com/web-design/jquery/using-jquery-tools-tabs/</link>
		<comments>http://www.moonkatcreations.com/web-design/jquery/using-jquery-tools-tabs/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 16:31:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://blog.moonkatcreations.com/?p=14</guid>
		<description><![CDATA[The nice thing about these tabs (the reason I chose to use these specifically) is that you can have multiple instances on a page. Just give each tab set&#8217;s list and div pane a unique class, make sure to rename the styles to correspond to these unique classes, and don&#8217;t forget to include one function [...]]]></description>
			<content:encoded><![CDATA[<p>The nice thing about these tabs (the reason I chose to use these specifically) is that you can have multiple instances on a page. Just give each tab set&#8217;s list and div pane a unique class, make sure to rename the styles to correspond to these unique classes, and don&#8217;t forget to include one function per tab set to activate them! You get some interesting results if you don&#8217;t use unique classes, like one tab set controlling what&#8217;s visible in another tab set.</p>
<p>Also, it is important to note that any child or descendant div will be hidden by default. However, since we can&#8217;t simply exclude the usage of divs within the tab panes (I want to be able to put whatever I want in them!), just put style=&#8221;display: block&#8221; on each descendant div.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.moonkatcreations.com/web-design/jquery/using-jquery-tools-tabs/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
