<?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>Jared Heinrichs &#187; Programming</title>
	<atom:link href="http://jaredheinrichs.com/category/programming/feed" rel="self" type="application/rss+xml" />
	<link>http://jaredheinrichs.com</link>
	<description>A Winnipeg &#34;How to&#34; Blog on Software and Technology</description>
	<lastBuildDate>Thu, 09 Feb 2012 15:35:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>CSS Relative image URL</title>
		<link>http://jaredheinrichs.com/css-relative-image-url.html</link>
		<comments>http://jaredheinrichs.com/css-relative-image-url.html#comments</comments>
		<pubDate>Tue, 31 Jan 2012 20:27:37 +0000</pubDate>
		<dc:creator>Jared Heinrichs</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://jaredheinrichs.com/?p=4701</guid>
		<description><![CDATA[When using relative URLS, CSS images are always relative to the CSS FILE and NOT the Page URL! Take this bit of CSS: Make sure that you create a folder in the folder where the CSS file is located. Call &#8230; <a href="http://jaredheinrichs.com/css-relative-image-url.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When using relative URLS, <strong>CSS images are always relative to the CSS FILE and NOT the Page URL</strong>!</p>
<p>Take this bit of CSS:</p>
<p><a href="http://jaredheinrichs.com/wp-content/uploads/2012/01/image4.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://jaredheinrichs.com/wp-content/uploads/2012/01/image_thumb.png" width="372" height="45" /></a> </p>
<ul>
<li>Make sure that you create a folder in the folder where the CSS file is located. Call it images.</li>
<li>Create a new file inside of images and called it: “header-background.jpg”</li>
</ul>
<p>If you make the CSS relative to the page you will be in a world of hurt!</p>
]]></content:encoded>
			<wfw:commentRss>http://jaredheinrichs.com/css-relative-image-url.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A running collection of fonts I like on Websites</title>
		<link>http://jaredheinrichs.com/a-running-collection-of-fonts-i-like-on-websites.html</link>
		<comments>http://jaredheinrichs.com/a-running-collection-of-fonts-i-like-on-websites.html#comments</comments>
		<pubDate>Wed, 27 Apr 2011 18:02:19 +0000</pubDate>
		<dc:creator>Jared Heinrichs</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://jaredheinrichs.com/a-running-collection-of-fonts-i-like-on-websites.html</guid>
		<description><![CDATA[Headings Page Example: Code Example: copy and paste: font-family: &#34;Yanone Kaffeesatz&#34;,&#34;Arial Narrow&#34;,Arial,sans-serif;]]></description>
			<content:encoded><![CDATA[<h2>Headings</h2>
<h3>Page Example: </h3>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://jaredheinrichs.com/wp-content/uploads/2011/04/image6.png" width="526" height="42" /></p>
<h3>Code Example:</h3>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://jaredheinrichs.com/wp-content/uploads/2011/04/image7.png" width="466" height="126" /></p>
<h3>copy and paste:</h3>
<p>font-family: &quot;Yanone Kaffeesatz&quot;,&quot;Arial Narrow&quot;,Arial,sans-serif;</p>
]]></content:encoded>
			<wfw:commentRss>http://jaredheinrichs.com/a-running-collection-of-fonts-i-like-on-websites.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clicking on hyperlink causes page to jump to the top</title>
		<link>http://jaredheinrichs.com/clicking-on-hyperlink-causes-page-to-jump-to-the-top.html</link>
		<comments>http://jaredheinrichs.com/clicking-on-hyperlink-causes-page-to-jump-to-the-top.html#comments</comments>
		<pubDate>Tue, 19 Apr 2011 19:17:07 +0000</pubDate>
		<dc:creator>Jared Heinrichs</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://jaredheinrichs.com/?p=4304</guid>
		<description><![CDATA[I found a fix to an issue that was driving me nuts. If I told a jquery do run an animation when I clicked on a hyper-link the page would &#8220;magically jump&#8221; to the top of the screen. When the &#8230; <a href="http://jaredheinrichs.com/clicking-on-hyperlink-causes-page-to-jump-to-the-top.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I found a fix to an issue that was driving me nuts. If I told a jquery do run an animation when I clicked on a hyper-link the page would &#8220;magically jump&#8221; to the top of the screen. When the page was &#8220;jumping&#8221; to the top of the screen the jquery animation was actually happening. By the time you scrolled down back to down the page you would only see that the object had moved.</p>
<p>Up until now I would just write something like:</p>
<ul>
<li>&lt;a href=&#8221;#&#8221;&gt;Click me&lt;/a&gt;</li>
</ul>
<p>While doing this isn&#8217;t an issue if the jquery animation happens at the top of the page, if you want to run an animation somewhere down the page the jumping result is really unwanted.</p>
<p>Thanks to <a href="http://corpocrat.com/2009/07/12/fix-jquery-onclick-browser-jumps-to-top-of-page/">http://corpocrat.com/2009/07/12/fix-jquery-onclick-browser-jumps-to-top-of-page/</a> I realized I need to change the code so that it looks like this:</p>
<ul>
<li>&lt;a href=&#8221;javascript:void(0);&#8221; onclick=&#8221;dofunc()&#8221;&gt;Click me&lt;/a&gt;</li>
</ul>
<p>Hope this helps you if you are experiencing the issue where clicking on a hyperlink causes the page to jump to the top of the screen.</p>
]]></content:encoded>
			<wfw:commentRss>http://jaredheinrichs.com/clicking-on-hyperlink-causes-page-to-jump-to-the-top.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Use jQuery to create a floating navigation based on scrolling</title>
		<link>http://jaredheinrichs.com/use-jquery-to-create-a-floating-navigation-based-on-scrolling.html</link>
		<comments>http://jaredheinrichs.com/use-jquery-to-create-a-floating-navigation-based-on-scrolling.html#comments</comments>
		<pubDate>Thu, 23 Dec 2010 04:14:33 +0000</pubDate>
		<dc:creator>Jared Heinrichs</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://jaredheinrichs.com/use-jquery-to-create-a-floating-navigation-based-on-scrolling.html</guid>
		<description><![CDATA[I didn’t know what else to call this post other than “Use jQuery to create a floating navigation based on scrolling”! If this doesn’t make sense let me describe want we will be creating. Hopefully after that things will become &#8230; <a href="http://jaredheinrichs.com/use-jquery-to-create-a-floating-navigation-based-on-scrolling.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I didn’t know what else to call this post other than “Use jQuery to create a floating navigation based on scrolling”! If this doesn’t make sense let me describe want we will be creating. Hopefully after that things will become clearer.</p>
<p>Have you ever seen a site where when you scroll an object on the page just seems to magically follow you? Most of the time this sort of thing is done with Ads so the ad is in your face. How do these guys do that?</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Use jQuery to create a floating navigation based on scrolling 01" border="0" alt="Use jQuery to create a floating navigation based on scrolling 01" src="http://jaredheinrichs.com/wp-content/uploads/2010/12/example.png" width="639" height="435" /></p>
<p>We will be looking at this but instead of using ads we are going to have our navigation area so that it’s always visible. As an extra bonus we’ll make our animated when it moves and we’ll make sure that it’s animation is as smooth as glass.</p>
<p>Before getting into thing you will need to know about the <a href="http://api.jquery.com/scroll/" target="_blank">scroll function in jquery</a>. Basically when ever you scroll and event will be made letting the script know that you’ve scrolled. While this is good when we scroll we’ll probably set off 100 or so scrolls in a very short span. Because of the amount of events created it can slow things down and make things choppy because it has to redraw after each event.</p>
<p>So how do we first of all code this and secondly how do we prevent the choppiness? I thought you’d never ask! Let’s look at the code:</p>
<h2>HTML</h2>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Use jQuery to create a floating navigation based on scrolling 02" border="0" alt="Use jQuery to create a floating navigation based on scrolling 02" src="http://jaredheinrichs.com/wp-content/uploads/2010/12/image32.png" width="639" height="435" /></p>
<h2>CSS</h2>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Use jQuery to create a floating navigation based on scrolling 03" border="0" alt="Use jQuery to create a floating navigation based on scrolling 03" src="http://jaredheinrichs.com/wp-content/uploads/2010/12/image33.png" width="411" height="183" /></p>
<h2>jQuery</h2>
<h2><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Use jQuery to create a floating navigation based on scrolling 04" border="0" alt="Use jQuery to create a floating navigation based on scrolling 04" src="http://jaredheinrichs.com/wp-content/uploads/2010/12/image34.png" width="438" height="216" /></h2>
<p>Ok the HTML should be really self explanatory. I will go over the CSS and jQuery.</p>
<h3>CSS</h3>
<p>Because I want to use positioning I give #navigation an absolute position of top – right on the page( Naigation will have a 5px padding). I also want it to hover over anything else (if the page is made smaller) so I gave it the highest z-index on the page. All links will be aligned to the right and I applied a background color to match the example above.</p>
<h3>jQuery</h3>
<p>First off I make sure that the page is ready. Next I want to grab jQuery’s “Window” element. I tell jQuery that when ever the Window scrolls to send an event. Now that we know that the scroll even happens we should do some magic on #navigation</p>
<p>Let’s select #navigation. Stop any animation that might be going on with it. Then let’s animate it. You might be asking why I ran stop. As you are scrolling you might send 20-40 events in a second to the browser. This means that jQuery has to do a ton of math. This will make things look jerky. To avoid this I just say… Stop let the browser do what it wants when the person stops start the animation.</p>
<p>If you’ve read some of my previous jQuery tutorials you might remember going over how animate works. The first section basically says: Assign the element top (This refers to the CSS position element “Top”) a value of what ever the documents Top position is.</p>
<p>The second part basically tell the animation how long to animate things for and what animation you want to use.</p>
<p>Try it out! It’s amazing how smooth jQuery can actually run when the code is clean!</p>
]]></content:encoded>
			<wfw:commentRss>http://jaredheinrichs.com/use-jquery-to-create-a-floating-navigation-based-on-scrolling.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to make a funky animated menu with jQuery</title>
		<link>http://jaredheinrichs.com/how-to-make-a-funky-animated-menu-with-jquery.html</link>
		<comments>http://jaredheinrichs.com/how-to-make-a-funky-animated-menu-with-jquery.html#comments</comments>
		<pubDate>Tue, 21 Dec 2010 17:13:17 +0000</pubDate>
		<dc:creator>Jared Heinrichs</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://jaredheinrichs.com/how-to-make-a-funky-animated-menu-with-jquery.html</guid>
		<description><![CDATA[Well Christmas for 2010 is coming fast and I thought I’d give you an early gift. In this post I will go over how to create a funky animated menu using jQuery. This menu will be a hover drop down &#8230; <a href="http://jaredheinrichs.com/how-to-make-a-funky-animated-menu-with-jquery.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Well Christmas for 2010 is coming fast and I thought I’d give you an early gift. In this post I will go over how to create a funky animated menu using jQuery. This menu will be a hover drop down menu. When you hover over the button a secret picture will be displayed. To give a better visual indication of being hovered over the text will change color. When the menu drops it will do a slight bounce and slide up smoothly.</p>
<p>Here’s what the menu will look like:</p>
<p><a href="http://jaredheinrichs.com/wp-content/uploads/2010/12/image28.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://jaredheinrichs.com/wp-content/uploads/2010/12/image_thumb18.png" width="374" height="127" /></a></p>
<p>I first show you the code and go over the most essential parts that you might get tripped up over.</p>
<h2>HTML</h2>
<p><a href="http://jaredheinrichs.com/wp-content/uploads/2010/12/image29.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://jaredheinrichs.com/wp-content/uploads/2010/12/image_thumb19.png" width="639" height="380" /></a></p>
<h2>CSS</h2>
<p><a href="http://jaredheinrichs.com/wp-content/uploads/2010/12/image30.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://jaredheinrichs.com/wp-content/uploads/2010/12/image_thumb20.png" width="709" height="513" /></a></p>
<h2>jQuery</h2>
<p><a href="http://jaredheinrichs.com/wp-content/uploads/2010/12/image31.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://jaredheinrichs.com/wp-content/uploads/2010/12/image_thumb21.png" width="442" height="359" /></a></p>
<h3>HTML</h3>
<p>The HTML should be pretty simple to read. I use classes to assign the hidden images. We’ll see more about this in the CSS section. Please note I did load jQuery UI to get the bounce effect.</p>
<h3>CSS</h3>
<p>this info</p>
<ul>
<li>#container is the main box in which every other item will live or be positioned to.</li>
<li>#navigation will be positioned in the top right corner. It will be slightly raised about the #container</li>
<li>#navigation li – We will float the list items so we can get a horizontal menu. List style is removed. I gave it a height to help older browsers.</li>
<li>#navigation li a – We center the text and make it a block level element so that we can give it a width,height and padding.</li>
<li>#navigation li a:hover – We said that we wanted the font to turn red when we hover over the buttons.</li>
<li>.jared&#160; etc – These classes get applied to the the li elements. This allows us to have specific icons on each menu item</li>
</ul>
<h3>jQuery</h3>
<p>I first selected the anchor tags and said when ever they are hovered do two things. One when you are hovered. One when the mouse is taken off the button. In each section we are going to apply an animation. The first animation will drop the button and bounce when it reaches the end. The second section will slide the button back up to it’s original position. The sliding effect is done using padding. I found this to work better than using height. Also for some strange reason if you use the bounce on the slide up, jQuery would throw an error in IE making it absolutely useless.</p>
<p>If you use this example in your code please post an example we can see how you modified things!</p>
]]></content:encoded>
			<wfw:commentRss>http://jaredheinrichs.com/how-to-make-a-funky-animated-menu-with-jquery.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery &#8211; How to run multiple animations at once</title>
		<link>http://jaredheinrichs.com/jquery-how-to-run-multiple-animations-at-once.html</link>
		<comments>http://jaredheinrichs.com/jquery-how-to-run-multiple-animations-at-once.html#comments</comments>
		<pubDate>Mon, 20 Dec 2010 19:55:00 +0000</pubDate>
		<dc:creator>Jared Heinrichs</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://jaredheinrichs.com/jquery-how-to-run-multiple-animations-at-once.html</guid>
		<description><![CDATA[If you have started using jQuery you might ask the question “how to do I run multiple animations at once in jQuery?”. Well it’s much easier than you might think! jQuery is set to automatically run multiple actions at one &#8230; <a href="http://jaredheinrichs.com/jquery-how-to-run-multiple-animations-at-once.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you have started using jQuery you might ask the question “how to do I run multiple animations at once in jQuery?”. Well it’s much easier than you might think! jQuery is set to automatically run multiple actions at one time. I’m going to give you a code example to show you how you would do this. Here is the code broken up into sections:</p>
<h2>HTML</h2>
<p><a href="http://jaredheinrichs.com/wp-content/uploads/2010/12/image25.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://jaredheinrichs.com/wp-content/uploads/2010/12/image_thumb15.png" width="669" height="324" /></a></p>
<p>Basically I have created 3 sections in the HTML.&#160; Using CSS I will turn them into boxes and give them some annoying colors.</p>
<h2>CSS</h2>
<p><a href="http://jaredheinrichs.com/wp-content/uploads/2010/12/image26.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://jaredheinrichs.com/wp-content/uploads/2010/12/image_thumb16.png" width="247" height="420" /></a></p>
<p>I wanted to do some cool things with jQuery. Box 3 will be partially hidden from view when it bounces. This happens because the CSS property overflow is set to “hidden” in Box2.</p>
<h2>jQuery</h2>
<p><a href="http://jaredheinrichs.com/wp-content/uploads/2010/12/image27.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://jaredheinrichs.com/wp-content/uploads/2010/12/image_thumb17.png" width="432" height="306" /></a></p>
<p>At first when you look at this, you might think that jQuery is going to animate box1. STOP. Animate box2. STOP. Then animate box3 and then STOP. If you did think that you aren’t alone. I thought the same thing. I thought that the “$” had magical powers that only ran the jQuery that it contained. If you type this code out you will see that all the boxes run at the same time. Because I used the same duration on each line all animations would start and end at the same time. If I mixed up the times then we can have then end at different times. If you did change the duration the start time would continue to be synced!</p>
<p>I really hope you try this code out. I thought the animation while being simple is very smooth and kind of fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://jaredheinrichs.com/jquery-how-to-run-multiple-animations-at-once.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My recommend programing workflow when programing jQuery&#8217;s animate function</title>
		<link>http://jaredheinrichs.com/my-recommend-programing-workflow-when-programing-jquerys-animate-function.html</link>
		<comments>http://jaredheinrichs.com/my-recommend-programing-workflow-when-programing-jquerys-animate-function.html#comments</comments>
		<pubDate>Thu, 16 Dec 2010 15:45:01 +0000</pubDate>
		<dc:creator>Jared Heinrichs</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[How To]]></category>

		<guid isPermaLink="false">http://jaredheinrichs.com/my-recommend-programing-workflow-when-programing-jquerys-animate-function.html</guid>
		<description><![CDATA[I didn’t realize just how powerful jQuery’s animate function is. In fact I can almost bet that functions like &#34;slideDown()” actually use it in the background. The one things about animate is that when you start using it the code &#8230; <a href="http://jaredheinrichs.com/my-recommend-programing-workflow-when-programing-jquerys-animate-function.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I didn’t realize just how powerful jQuery’s animate function is. In fact I can almost bet that functions like &quot;slideDown()” actually use it in the background. The one things about animate is that when you start using it the code can become much more complex then one would like. Personally I recommend using Netbeans IDE as I find it to be the best editor for most web programming. (PS – It’s FREE!!!!)</p>
<p>One thing I have found that helps me is I build out the shell of what I want to do and then fill in the details later. While this might seem like a waste of time or slower I find with the auto complete in Netbeans that I spend much less time later troubleshooting things when I make a mistake typing.</p>
<p>The first thing I do with animate is start with the basic by programming out the shell of the code.</p>
<p>First hit “$” and then “(“. Netbeans will automatically fill in the “)”. Great!. Now hit ‘ and a second ‘ will be entered automatically for you in Netbeans. Keep typing. Enter your jQuery Selector which is normally the DOM element that you want to select. Hit the “right arrow twice and hit the “.” key. Great you are on your way.</p>
<p>You should have something that looks like this:</p>
<p><a href="http://jaredheinrichs.com/wp-content/uploads/2010/12/image18.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://jaredheinrichs.com/wp-content/uploads/2010/12/image_thumb8.png" width="660" height="205" /></a></p>
<p>You really want to see this drop down box as it will save you a lot of time. You can either manually go through it or keep typing to narrow your results. In our case we are wanting to use animate. Let’s type animate and see what happens.</p>
<p><a href="http://jaredheinrichs.com/wp-content/uploads/2010/12/image19.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://jaredheinrichs.com/wp-content/uploads/2010/12/image_thumb9.png" width="542" height="81" /></a></p>
<p>As you can see I’ve only typed “ani” and Netbeans is smart enough to grab the functions from the jQuery file. Just hit enter and Netbeans will start to build out the template for you. You will see something like this:</p>
<p>Netbeans is smart enough to tell you were the parameters go and where the option go. At this time I recommend just typing “{“ in both the params section as well as the options section. When you hit “{“ the right “}” will automatically be entered. After entering the “{“ just hit enter to move on to the “options section”. Hit “{“ and again the second “}” will auto complete. Hit Enter and the cursor will automatically move to the end of the line. Hit “;” and you are now done making the shell of the animate function. It should look like this:</p>
<p><a href="http://jaredheinrichs.com/wp-content/uploads/2010/12/image20.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://jaredheinrichs.com/wp-content/uploads/2010/12/image_thumb10.png" width="335" height="56" /></a></p>
<p>Now some people might not agree with this next step. WHEN programing I like making my code easy to read even if it means that the file that the code is in is larger! When I am done everything I normally run a minifier on all my code that goes up to the server. </p>
<p>Let’s make the code more readable. Doesn’t this look more like something you see in other languages?</p>
<p><a href="http://jaredheinrichs.com/wp-content/uploads/2010/12/image21.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://jaredheinrichs.com/wp-content/uploads/2010/12/image_thumb11.png" width="292" height="128" /></a></p>
<p>Let’s go and enter the code that will actually do something.</p>
<p><a href="http://jaredheinrichs.com/wp-content/uploads/2010/12/image22.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://jaredheinrichs.com/wp-content/uploads/2010/12/image_thumb12.png" width="284" height="125" /></a></p>
<p>In the above code example notice how I entered what I want the animate to do. jQuery is VERY tied to CSS. If you don’t know CSS then you should really become a CSS Ninja before heading in jQuery. One thing to note on line 3. If the CSS element has “-“ in it you should use camelCase. If you aren’t sure what that is search my site for “camelCase”. Notice on line 3 that there is NO trailing “;”. With so much of jQuery requiring a trailing “;” I like to point that out since I find I get in such a habit of close everything off. If we needed to do a second animation we would hover end the line with a “&#8217;,”. You will see in the next section called “options”.</p>
<p><a href="http://jaredheinrichs.com/wp-content/uploads/2010/12/image23.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://jaredheinrichs.com/wp-content/uploads/2010/12/image_thumb13.png" width="367" height="145" /></a></p>
<p>In the above code example I have added two options to the command. I have put them on separate lines for easy reading and put a “,” at the end of the duration. This code is now very easy to read, the chances for error has gone down dramatically which means you have more time to code.</p>
<p>I mentioned about minifying the code so once that is done it might look more like this:</p>
<p><a href="http://jaredheinrichs.com/wp-content/uploads/2010/12/image24.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://jaredheinrichs.com/wp-content/uploads/2010/12/image_thumb14.png" width="668" height="18" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://jaredheinrichs.com/my-recommend-programing-workflow-when-programing-jquerys-animate-function.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Two things that cause jQuery jerky animations</title>
		<link>http://jaredheinrichs.com/two-things-that-cause-jquery-jerky-animations.html</link>
		<comments>http://jaredheinrichs.com/two-things-that-cause-jquery-jerky-animations.html#comments</comments>
		<pubDate>Wed, 15 Dec 2010 02:42:01 +0000</pubDate>
		<dc:creator>Jared Heinrichs</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[How To]]></category>

		<guid isPermaLink="false">http://jaredheinrichs.com/two-things-that-cause-jquery-jerky-animations.html</guid>
		<description><![CDATA[There are a couple of things that I have found to cause jerky animations. Height and width not set. This really seems to slow things down in all the browsers. Margin set on element above the element that is sliding &#8230; <a href="http://jaredheinrichs.com/two-things-that-cause-jquery-jerky-animations.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There are a couple of things that I have found to cause jerky animations.</p>
<ol>
<li>Height and width not set. This really seems to slow things down in all the browsers.</li>
<li>Margin set on element above the element that is sliding open/shut.</li>
</ol>
<p>Always keeps these things in mind and you should always experience super slick jQuery animation. Don’t you just hate jerky jQuery animations?</p>
<p>Here’s an example to try (I am using jQuery and jQuery UI:</p>
<h2>xhtml</h2>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://jaredheinrichs.com/wp-content/uploads/2010/12/image15.png" width="643" height="522" /></p>
<h2>CSS</h2>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://jaredheinrichs.com/wp-content/uploads/2010/12/image16.png" width="385" height="306" /></p>
<h2>jQuery</h2>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://jaredheinrichs.com/wp-content/uploads/2010/12/image17.png" width="361" height="238" /></p>
<p>If you remove the height and width from the “p” tag then the animation will be really sluggish/jerky.</p>
]]></content:encoded>
			<wfw:commentRss>http://jaredheinrichs.com/two-things-that-cause-jquery-jerky-animations.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery&#8211;When to use Camel-Cased values in animate?</title>
		<link>http://jaredheinrichs.com/jquerywhen-to-use-camel-cased-values-in-animate.html</link>
		<comments>http://jaredheinrichs.com/jquerywhen-to-use-camel-cased-values-in-animate.html#comments</comments>
		<pubDate>Tue, 14 Dec 2010 20:26:16 +0000</pubDate>
		<dc:creator>Jared Heinrichs</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[How To]]></category>

		<guid isPermaLink="false">http://jaredheinrichs.com/jquerywhen-to-use-camel-cased-values-in-animate.html</guid>
		<description><![CDATA[I didn’t realize that you didn’t HAVE to use normal CSS syntax in jQuery! By default you only have to use single apostrophes when the value has hyphen in the name. If I’ve completely lost you let’s look at some &#8230; <a href="http://jaredheinrichs.com/jquerywhen-to-use-camel-cased-values-in-animate.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I didn’t realize that you didn’t HAVE to use normal CSS syntax in jQuery! By default you only have to use single apostrophes when the value has hyphen in the name. If I’ve completely lost you let’s look at some code.</p>
<h2>jQuery</h2>
<p><a href="http://jaredheinrichs.com/wp-content/uploads/2010/12/image12.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://jaredheinrichs.com/wp-content/uploads/2010/12/image_thumb5.png" width="315" height="112" /></a></p>
<p>Please note lines&#160; 3 and 4. The CSS values “margin-left” and “margin-top” are surrounded by ‘s. Most people don’t know that there is a shorthand method that I think looks much better (IMO) and saves you a few keystrokes. Using “camelCased” coding you can change the jQuery code into this:</p>
<h2>jQuery</h2>
<p><a href="http://jaredheinrichs.com/wp-content/uploads/2010/12/image13.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://jaredheinrichs.com/wp-content/uploads/2010/12/image_thumb6.png" width="293" height="112" /></a></p>
<p>As you can see you can remove the ‘ and the – but you HAVE to uppercase the second word’s first initial. I like using this because not only does it save keystrokes I also find it also helps me with closing the ‘s! Hopefully this trick will help you with jQuery’s most versatile function.</p>
<p>As a bonus I figured I through in another example:</p>
<h2>jQuery</h2>
<p><a href="http://jaredheinrichs.com/wp-content/uploads/2010/12/image14.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://jaredheinrichs.com/wp-content/uploads/2010/12/image_thumb7.png" width="396" height="199" /></a></p>
<p>This time you cane see that I used “paddingLeft” instead of “padding-left”. This code basically will take the paragraph element and slide it to the right 200px when you hover over it. It will slide back to it’s original spot when you take the mouse off.</p>
]]></content:encoded>
			<wfw:commentRss>http://jaredheinrichs.com/jquerywhen-to-use-camel-cased-values-in-animate.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>z-index background issues</title>
		<link>http://jaredheinrichs.com/z-index-background-issues.html</link>
		<comments>http://jaredheinrichs.com/z-index-background-issues.html#comments</comments>
		<pubDate>Mon, 13 Dec 2010 17:45:21 +0000</pubDate>
		<dc:creator>Jared Heinrichs</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://jaredheinrichs.com/z-index-background-issues.html</guid>
		<description><![CDATA[This post will cover how I worked around some z-index background issues I was having. In a recent project I was working on I wanted to use a “div” underneath a bunch of list items/anchor tags. I wanted to see &#8230; <a href="http://jaredheinrichs.com/z-index-background-issues.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This post will cover how I worked around some z-index background issues I was having. In a recent project I was working on I wanted to use a “div” underneath a bunch of list items/anchor tags. I wanted to see the “div” above the rest of the items but below List items. While it’s pretty trivial doing it if NON of the items in the DOM tree have a background applied to them, I needed to use a background color.</p>
<p>*NOTE* &#8211; Before I go any further you might be asking why I didn’t just us a background color using CSS for each item. I couldn’t use the easy way because I eventually I wanted to slide the “highlight” from the left to where ever the person was holding their mouse.</p>
<p>Here’s an example of what I wanted to make:</p>
<p><a href="http://jaredheinrichs.com/wp-content/uploads/2010/12/image7.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://jaredheinrichs.com/wp-content/uploads/2010/12/image_thumb.png" width="384" height="94" /></a></p>
<p>Unfortunately I kept getting something like this:</p>
<p><a href="http://jaredheinrichs.com/wp-content/uploads/2010/12/image8.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://jaredheinrichs.com/wp-content/uploads/2010/12/image_thumb1.png" width="371" height="92" /></a></p>
<p>Let’s look at the code to see how this issue can be resolved quite simply.</p>
<h2>XHTML</h2>
<p><a href="http://jaredheinrichs.com/wp-content/uploads/2010/12/image9.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="z-index background issue 01" border="0" alt="z-index background issue 01" src="http://jaredheinrichs.com/wp-content/uploads/2010/12/image_thumb2.png" width="500" height="410" /></a></p>
<h2>CSS (That didn’t work)</h2>
<p><a href="http://jaredheinrichs.com/wp-content/uploads/2010/12/image10.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="z-index background issue 02" border="0" alt="z-index background issue 02" src="http://jaredheinrichs.com/wp-content/uploads/2010/12/image_thumb3.png" width="336" height="545" /></a></p>
<h2>CSS (That did work. I’ve highlighted the line that fixed the issue) </h2>
<p><a href="http://jaredheinrichs.com/wp-content/uploads/2010/12/image11.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="z-index background issue 03" border="0" alt="z-index background issue 03" src="http://jaredheinrichs.com/wp-content/uploads/2010/12/image_thumb4.png" width="326" height="562" /></a></p>
<p>So basically I always thought the z-index on HTML elements was “0”/Or not set. This doesn’t seem to be the case. It looks like they are always set to 1. Another really important thing to include is the “position: relative”. If you were to excluded that from the code it wouldn’t work either.</p>
]]></content:encoded>
			<wfw:commentRss>http://jaredheinrichs.com/z-index-background-issues.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

