<?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>Element Design &#187; jQuery</title>
	<atom:link href="http://elementdesignllc.com/category/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://elementdesignllc.com</link>
	<description></description>
	<lastBuildDate>Fri, 11 Jun 2010 13:37:49 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The Easiest Way to Select All Checkboxes with jQuery</title>
		<link>http://elementdesignllc.com/2009/12/jquery-select-all-checkboxes/</link>
		<comments>http://elementdesignllc.com/2009/12/jquery-select-all-checkboxes/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 17:57:11 +0000</pubDate>
		<dc:creator>chad</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[checkbox]]></category>
		<category><![CDATA[select all]]></category>

		<guid isPermaLink="false">http://elementdesignllc.com/?p=438</guid>
		<description><![CDATA[After looking at many code samples online that were unnecessarily complex I&#8217;ve come up with my own simple method of selecting all checkboxes on a page:

$(&#34;:checkbox&#34;).attr(&#34;checked&#34;, true);

You can change the selector to target certain groups of checkboxes.
To deselect all checkboxes, simply change the &#8220;true&#8221; to &#8220;false&#8221;:

$(&#34;:checkbox&#34;).attr(&#34;checked&#34;, false);

]]></description>
			<content:encoded><![CDATA[<p>After looking at many code samples online that were unnecessarily complex I&#8217;ve come up with my own simple method of selecting all checkboxes on a page:</p>
<pre class="brush: jscript;">
$(&quot;:checkbox&quot;).attr(&quot;checked&quot;, true);
</pre>
<p>You can change the selector to target certain groups of checkboxes.</p>
<p>To deselect all checkboxes, simply change the &#8220;true&#8221; to &#8220;false&#8221;:</p>
<pre class="brush: jscript;">
$(&quot;:checkbox&quot;).attr(&quot;checked&quot;, false);
</pre>
]]></content:encoded>
			<wfw:commentRss>http://elementdesignllc.com/2009/12/jquery-select-all-checkboxes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>jQuery UI Datepicker Inline Select</title>
		<link>http://elementdesignllc.com/2009/09/jquery-ui-datepicker-inline-select/</link>
		<comments>http://elementdesignllc.com/2009/09/jquery-ui-datepicker-inline-select/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 13:00:33 +0000</pubDate>
		<dc:creator>chad</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[datepicker]]></category>

		<guid isPermaLink="false">http://elementdesignllc.com/?p=278</guid>
		<description><![CDATA[It is well documented on the jQuery UI site on how to take a value from Datepicker when calling it from an input field. However when embedding Datepicker on a page (associating it with a div instead of an input field), you have to add a small amount of code to easily capture values from [...]]]></description>
			<content:encoded><![CDATA[<p>It is <a href="http://jqueryui.com/demos/datepicker/" target="_blank">well documented</a> on the jQuery UI site on how to take a value from Datepicker when calling it from an input field. However when embedding Datepicker on a page (associating it with a div instead of an input field), you have to add a small amount of code to easily capture values from it.</p>
<p style="text-align: center;"><img class="size-full wp-image-279  aligncenter" title="Inline Datepicker" src="http://elementdesignllc.com/wp-content/uploads/2009/08/datepicker_inline.png" alt="Inline Datepicker" width="320" height="325" /></p>
<p style="text-align: center;"><a href="http://elementdesignllc.com/demos/datepicker_inline.html" target="_blank">Inline Datepicker Demo</a></p>
<p>The key component to making it work is using the onSelect event. Here is the jQuery code, with &#8220;#datepicker&#8221; as a div:</p>
<pre class="brush: jscript;">
$(&quot;#datepicker&quot;).datepicker({
   onSelect: function(dateText, inst) {
      $(&quot;#datepicker_value&quot;).val(dateText);
   }
});
</pre>
<p>&#8220;#datepicker_value&#8221; is an input field that is updated every time the user selects a different date. This input field can be easily added to any form for submit. Visit the <a href="http://elementdesignllc.com/demos/datepicker_inline.html" target="_blank">Datepicker demo page</a> for a working example.</p>
]]></content:encoded>
			<wfw:commentRss>http://elementdesignllc.com/2009/09/jquery-ui-datepicker-inline-select/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Wordpress &amp; jQuery: &#8220;$ is not a function&#8221;</title>
		<link>http://elementdesignllc.com/2009/08/wordpress-jquery-is-not-a-function/</link>
		<comments>http://elementdesignllc.com/2009/08/wordpress-jquery-is-not-a-function/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 13:00:06 +0000</pubDate>
		<dc:creator>chad</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://elementdesignllc.com/blog/?p=139</guid>
		<description><![CDATA[If you are trying to add your own jQuery code to Wordpress, and have had the error &#8220;$ is not a function&#8221; show up on Firebug, here is the fix:
Convert all dollar signs ($) to &#8216;jQuery&#8217;
The dollar sign is reserved in Wordpress for the Prototype library, which is why it errors out. For example, instead [...]]]></description>
			<content:encoded><![CDATA[<p>If you are trying to add your own jQuery code to Wordpress, and have had the error &#8220;<span>$ is not a function&#8221; show up on Firebug, here is the fix:</span></p>
<p><span><strong>Convert all dollar signs ($) to &#8216;jQuery&#8217;</strong></span></p>
<p><span>The dollar sign is reserved in Wordpress for the Prototype library, which is why it errors out. For example, instead of</span>:</p>
<pre class="brush: jscript;">
$().ready(function() {
   $(&quot;#select_me&quot;).show();
});
</pre>
<p>Change it to:</p>
<pre class="brush: jscript;">
jQuery().ready(function() {
   jQuery(&quot;#select_me&quot;).show();
});
</pre>
]]></content:encoded>
			<wfw:commentRss>http://elementdesignllc.com/2009/08/wordpress-jquery-is-not-a-function/feed/</wfw:commentRss>
		<slash:comments>37</slash:comments>
		</item>
		<item>
		<title>Jcrop Large Image Previews</title>
		<link>http://elementdesignllc.com/2009/08/jcrop-large-image-previews/</link>
		<comments>http://elementdesignllc.com/2009/08/jcrop-large-image-previews/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 17:07:36 +0000</pubDate>
		<dc:creator>chad</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[image cropping]]></category>
		<category><![CDATA[jcrop]]></category>

		<guid isPermaLink="false">http://elementdesignllc.com/blog/?p=15</guid>
		<description><![CDATA[Jcrop is an excellent jQuery plugin developed by Deep Liquid. It is used to easily crop images on websites without having to use any photo editing software.
There is documentation on their website on how to use boxWidth and boxHeight to deal with large resolution pictures, however it does not tie together those methods with the [...]]]></description>
			<content:encoded><![CDATA[<p>Jcrop is an excellent jQuery plugin developed by <a href="http://deepliquid.com/content/Jcrop.html" target="_blank">Deep Liquid</a>. It is used to easily crop images on websites without having to use any photo editing software.</p>
<p>There is documentation on their website on <a href="http://deepliquid.com/content/Jcrop_Sizing_Issues.html" target="_blank">how to use boxWidth and boxHeight</a> to deal with large resolution pictures, however it does not tie together those methods with the preview pane (<a href="http://deepliquid.com/projects/Jcrop/demos.php?demo=thumbnail" target="_blank">visit the demo this post is referencing</a>).</p>
<p>Assuming you are using boxWidth to shrink down the image to 500 pixels wide, with a thumbnail 80 pixels by 80 pixels, use the following code to correctly display the preview pane.</p>
<pre class="brush: jscript; highlight: [13,14,17,18];">
jQuery('#cropbox').Jcrop({
   onChange: showPreview,
   onSelect: updateCoords,
   aspectRatio: 1,
   boxWidth: 500
});

function showPreview(coords) {
   if (parseInt(coords.w) &gt; 0) {
      var rx = 80 / coords.w;
      var ry = 80 / coords.h;

      var img_height = $(&quot;#cropbox&quot;).height();
      var img_width = $(&quot;#cropbox&quot;).width();

      jQuery('#preview').css({
         width: Math.round(rx * img_width) + 'px',
         height: Math.round(ry * img_height) + 'px',
         marginLeft: '-' + Math.round(rx * coords.x) + 'px',
         marginTop: '-' + Math.round(ry * coords.y) + 'px'
     });
   }
};
</pre>
<p>The variables img_height and img_width find the new dimensions of the image, which are unique for images with different dimensions. The variables are then used to make calculations for the width and height of the preview pane.</p>
]]></content:encoded>
			<wfw:commentRss>http://elementdesignllc.com/2009/08/jcrop-large-image-previews/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
