<?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>AmberWeinberg.com &#187; jQuery</title> <atom:link href="http://www.amberweinberg.com/tag/jquery/feed/" rel="self" type="application/rss+xml" /><link>http://www.amberweinberg.com</link> <description>Design, Development and Freelance Articles and Tutorials</description> <lastBuildDate>Fri, 03 Feb 2012 15:14:56 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Think Vitamin Membership Review–Great Way to Expand Your Web Knowledge</title><link>http://www.amberweinberg.com/think-vitamin-membership-review%e2%80%93great-way-to-expand-your-web-knowledge/</link> <comments>http://www.amberweinberg.com/think-vitamin-membership-review%e2%80%93great-way-to-expand-your-web-knowledge/#comments</comments> <pubDate>Tue, 26 Jul 2011 13:30:33 +0000</pubDate> <dc:creator>Amber Weinberg</dc:creator> <category><![CDATA[blog]]></category> <category><![CDATA[development]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[CSS3]]></category> <category><![CDATA[design]]></category> <category><![CDATA[HTML]]></category> <category><![CDATA[HTML5]]></category> <category><![CDATA[iphone]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[objective c]]></category> <category><![CDATA[php]]></category> <category><![CDATA[reviews]]></category> <category><![CDATA[tools]]></category><guid
isPermaLink="false">http://www.amberweinberg.com/?p=4564</guid> <description><![CDATA[I’ve been investing a lot of my time lately on learning new things. I prefer to stay a front-end developer, but I’ve always wanted to play in different languages and keep up to date with design trends. Following long how-to books really isn’t my thing, as I usually end up falling asleep before the first [...]]]></description> <content:encoded><![CDATA[<p>I’ve been investing a lot of my time lately on learning new things. I prefer to stay a front-end developer, but I’ve always wanted to play in different languages and keep up to date with design trends. Following long how-to books really isn’t my thing, as I usually end up falling asleep before the first chapter ends.</p><p>I’ve never been a big fan of video on the web either, since I’m never at my computer unless I’m working so I never have time to watch. However, upon learning that Think Vitamin created a new membership service, called Think Vitamin Membership, I was immediately interested.</p><p><a
href="http://www.amberweinberg.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2ZyZWVsYW5jZWZvbGRlci5jb20vZXhwYW5kaW5nLXlvdXItd2ViLWtub3dsZWRnZS13aXRoLWEtdGhpbmstdml0YW1pbi1tZW1iZXJzaGlwLw==" target=\"_blank\">Read the rest of my post on FreelanceFolder</a></p> <img
src="http://www.amberweinberg.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=4564" width="1" height="1" style="display: none;" />]]></content:encoded> <wfw:commentRss>http://www.amberweinberg.com/think-vitamin-membership-review%e2%80%93great-way-to-expand-your-web-knowledge/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Beginning jQuery: Your First Clean Tabbed Plugin</title><link>http://www.amberweinberg.com/beginning-jquery-your-first-clean-tabbed-plugin/</link> <comments>http://www.amberweinberg.com/beginning-jquery-your-first-clean-tabbed-plugin/#comments</comments> <pubDate>Thu, 13 Jan 2011 14:30:27 +0000</pubDate> <dc:creator>Amber Weinberg</dc:creator> <category><![CDATA[blog]]></category> <category><![CDATA[development]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[HTML]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[tutorial]]></category><guid
isPermaLink="false">http://www.amberweinberg.com/?p=3685</guid> <description><![CDATA[I&#8217;ve been spending a lot of time learning jQuery the past couple of weeks and I&#8217;ve never realized just how fun it is to work with (at least when it is working right) and I&#8217;ve already been able to write several of my own functions and plugins. The other day I wrote a basic tab [...]]]></description> <content:encoded><![CDATA[<p>I&#8217;ve been spending a lot of time learning jQuery the past couple of weeks and I&#8217;ve never realized just how fun it is to work with (at least when it <em>is</em> working right) and I&#8217;ve already been able to write several of my own functions and plugins.</p><p>The other day I wrote a basic tab feature for a client and thought it would make a great beginner&#8217;s tutorial. While it&#8217;s not the coolest plugin in the world, it&#8217;s something that clients use quite commonly. So let&#8217;s get started!</p><h3>The HTML</h3><p>First, we need to start off with the HTML. In order for our tabs to work, we need to set up a list of links for the tabs and the divs for the content. One of the cool things that makes this different from jQuery&#8217;s standard UI tabs, is that you don&#8217;t have to the tabs and the divs in the same container, you can theoretically place them wherever you want.</p><div
class="wp_syntax"><div
class="code"><pre class="html" style="font-family:monospace;">&lt;div id=&quot;container&quot;&gt;
&lt;div id=&quot;tab1&quot;&gt;This is tab 1!&lt;/div&gt;
&lt;div id=&quot;tab2&quot;&gt;This is tab 2!&lt;/div&gt;
&lt;div id=&quot;tab3&quot;&gt;This is tab 3!&lt;/div&gt;
&lt;div id=&quot;tab4&quot;&gt;This is tab 4!&lt;/div&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a class=&quot;tab1&quot;&gt;tab 1&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a class=&quot;tab2&quot;&gt;tab 2&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a class=&quot;tab3&quot;&gt;tab 3&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a class=&quot;tab4&quot;&gt;tab 4&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</pre></div></div><p>If you were to save the page and load it now, you&#8217;ll see that every div shows up, which is not what we want! Let&#8217;s give it some CSS love to hide ALL of the divs and float the tab links together like a real navigation.</p><h3>The CSS</h3><div
class="wp_syntax"><div
class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#container</span> div <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#container</span> li <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div><h3>The jQuery</h3><p>Now for the awesome fun stuff! First things first. If we load the page to see what we&#8217;ve done so far, you can now see the navigation, but none of the divs are showing up because we hid them all. We of course want to show the first div, and this can be done in several ways, but for the purposes of learning jQuery, let&#8217;s do it there.</p><p>Before you start, you need to declare a document ready function. Basically document ready tells the jQuery to wait until the website has loaded before trying to implement the JS.</p><div
class="wp_syntax"><div
class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>After document ready, we&#8217;re ready to tell jQuery to show our first tab&#8217;s div. Let&#8217;s also give our link to the tab1 an active status so we know that&#8217;s the tab we&#8217;re on.</p><p>jQuery is actually pretty simple and it&#8217;s more difficult to remember the syntax of parenthesis and curly brackets than it is the actual code. To tell jQuery to display something, we simply give it the show() function.</p><p>Similarily, if we want to give the corresponding link an active class so we can style it differently, we simply give it the addClass() function. Not too hard eh? Here&#8217;s the code:</p><div
class="wp_syntax"><div
class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#tab1'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.tab1'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'active'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>Now we need to make the tabs actually work when we click on the corresponding link. jQuery is so easy, I bet you&#8217;ve already guessed that the function is called click(). This tells jQuery that when the user clicks on the item it&#8217;s appending to, to perform an action.</p><div
class="wp_syntax"><div
class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#tab1'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.tab1'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'active'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.tab1'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>We then need to tell jQuery to hide ALL of the divs again, otherwise if you were to click on tab1 and tab4, it would show both, before showing the right div. Just like the show() function, we have another easy function for that: hide(). Then we need to remove the active class from all of the links before adding the class to the active link.</p><div
class="wp_syntax"><div
class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#tab1'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.tab1'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'active'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.tab1'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#container div'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#tab1'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#container a'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">removeClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'active'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.tab1'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'active'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.tab2'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#container div'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#tab2'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#container a'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">removeClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'active'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.tab2'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'active'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.tab3'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#container div'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#tab3'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#container a'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">removeClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'active'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.tab3'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'active'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.tab4'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#container div'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#tab4'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#container a'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">removeClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'active'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.tab4'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'active'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>See how easy that was? It&#8217;s unbelievable how easy and quick jQuery has been to learn so far. Of course, there are plenty of advanced plugins that will take forever to learn, but for the most common items like dropdown menus, tabs and sliders, it&#8217;s actually pretty easy!</p><p>Of course, you can simply use the tabs built into jQuery UI itself, but what fun is that? Sometimes it&#8217;s quicker and easier to roll your own, especially when you get into some of these designers&#8217; crazy widget things.</p><p><a
title=\"View demo\" href="http://www.amberweinberg.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5hbWJlcndlaW5iZXJnLmNvbS9kZW1vcy90YWJzLnBocA=="><strong>View Demo</strong></a></p> <img
src="http://www.amberweinberg.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=3685" width="1" height="1" style="display: none;" />]]></content:encoded> <wfw:commentRss>http://www.amberweinberg.com/beginning-jquery-your-first-clean-tabbed-plugin/feed/</wfw:commentRss> <slash:comments>17</slash:comments> </item> <item><title>Becoming A Better Developer For 2011</title><link>http://www.amberweinberg.com/becoming-a-better-developer-for-2011/</link> <comments>http://www.amberweinberg.com/becoming-a-better-developer-for-2011/#comments</comments> <pubDate>Mon, 27 Dec 2010 14:30:31 +0000</pubDate> <dc:creator>Amber Weinberg</dc:creator> <category><![CDATA[blog]]></category> <category><![CDATA[development]]></category> <category><![CDATA[improvement]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[objective c]]></category> <category><![CDATA[personal stories]]></category> <category><![CDATA[strategy]]></category> <category><![CDATA[validation]]></category> <category><![CDATA[wordpress]]></category><guid
isPermaLink="false">http://www.amberweinberg.com/?p=3812</guid> <description><![CDATA[It&#8217;s time for the New Year to begin so we all know what that means &#8211; an excuse to learn and become something better than we already are1 For the holiday months, I&#8217;ve spent a ton of time learning, reading and trying out new coding techniques to find out what works best. Every site I [...]]]></description> <content:encoded><![CDATA[<p>It&#8217;s time for the New Year to begin so we all know what that means &#8211; an excuse to learn and become something better than we already are1 For the holiday months, I&#8217;ve spent a ton of time learning, reading and trying out new coding techniques to find out what works best. Every site I code, I always try to do something  a little bit different in order to constantly improve on what I&#8217;m doing.</p><p>Web technology is always evolving and it seems that every day there&#8217;s something new that&#8217;s come out. It&#8217;s enough to make a sane developer crazy &#8211; and unfortunately that means we can never take a rest from our world, or we risk being left behind. (Man that sounds like an awesome movie trailor&#8230;)</p><p>I&#8217;d love to share with you some of things I&#8217;ve been learning lately, as well as some new(or new to me) coding tricks.</p><h3>HTML/HTML5</h3><p>Frankly, I got so tired of hearing about HTML5, that I finally decided to try it. I now validate all of my sites in HTML5 and use all of the new shorten info in the head tag that comes along with it. However, I don&#8217;t use any of the hew HTML5 tags, as they require hacks to get them to work in Internet Explorer. We all know how I feel about hacks, and it&#8217;s isn&#8217;t good.</p><p>In order to help me learn and understand the updates to HTML, I&#8217;ve bought several books (and written reviews for you) on the subject:</p><ul><li><a
href="http://www.amberweinberg.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5hbWJlcndlaW5iZXJnLmNvbS9yZXZpZXctb2YtaHRtbDUtZm9yLXdlYi1kZXNpZ25lcnMtYnktamVyZW15LWtlaXRoLw==">HTML5 For Web Developers</a></li><li><a
href="http://www.amberweinberg.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5hbWJlcndlaW5iZXJnLmNvbS9idWlsZGluZy1maW5kYWJsZS13ZWJzaXRlcy8=">Building Findable Websites</a></li><li><a
href="http://www.amberweinberg.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5hbWJlcndlaW5iZXJnLmNvbS90aGUtc21hc2hpbmctYm9vay1yZXZpZXctYW5kLXdpbi1hLWNvcHkv">The Smashing Book</a></li><li>Hardboiled Web Design (bought but not read yet)</li></ul><p>Of course I have a TON of books on <a
href="http://www.amberweinberg.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5nb29kcmVhZHMuY29tL3Jldmlldy9saXN0LzI4OTE2ODEtYW1iZXItd2VpbmJlcmc/c2hlbGY9dG8tcmVhZA==">my wishlist</a> for all of these categories!</p><h3>CSS/CSS3</h3><p>I&#8217;ve been using CSS3 for several months now and have been able to convince my clients to embrace the idea of progressive enhancement. CSS3 has sped up my coding noticeably, as I no longer have to take the time to slice and code up images for shadows, rounded corners and the like. Also, the new advanced selectors have made my code cleaner and more efficient. I think this is why I&#8217;m starting to enjoy mobile development more &#8211; because I don&#8217;t have to worry about IE at all and can pretty much use CSS3 to it&#8217;s fullest.</p><p>And the books I&#8217;ve read on the subject:</p><ul><li><a
href="http://www.amberweinberg.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5hbWJlcndlaW5iZXJnLmNvbS9yZXZpZXctb2YtYWR2YW5jZWQtY3NzLWJ5LWpvc2VwaC1sZXdpcy8=">Advanced CSS</a></li><li><a
href="http://www.amberweinberg.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5hbWJlcndlaW5iZXJnLmNvbS9zbWFzaGluZy1jc3MtYnktZXJpYy1tZXllci8=">Smashing CSS</a></li><li>CSS3 for Web Designers (bought but not read yet)</li></ul><h3>Improvements To Coding</h3><p>All this book reading would be for nothing if I didn&#8217;t actually learn and implement any of it. In fact, I learned a ton and have made major revisions to the way I write CSS and a few to HTML as well.</p><p><strong>CSS</strong></p><p>I continue to prefer single line CSS, but I&#8217;ve now just started to put my declarations in alphabetical order. While I&#8217;m still getting used to this, it&#8217;s made it a lot easier to find what I&#8217;m looking for, especially on longer lines. I&#8217;ve also learned some nifty new selectors I never though to use before. The most helpful has been the use of:</p><div
class="wp_syntax"><div
class="code"><pre class="css" style="font-family:monospace;"> a <span style="color: #00AA00;">&gt;</span> d <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span></pre></div></div><p>Which selects only the top level child of the element. This select has been so incredibly useful, I can&#8217;t believe I never used it before.</p><p>I&#8217;ve also started using shorter selectors and not chaining them as much. This makes the file smaller and quicker to implement on loading.</p><p><strong>HTML</strong></p><p>Besides switch over to the HTML5 doctype and using the new &lt;head&gt; elements, there&#8217;s not much I&#8217;ve changed in my HTML. I have stopped using containers as much as possible, and instead have started centering the divs, and putting backgrounds on the &lt;html&gt; and &lt;body&gt; tags. This lends to much cleaner code.</p><p>To see examples of all of these, you&#8217;re welcome to download my <a
href="http://www.amberweinberg.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5hbWJlcndlaW5iZXJnLmNvbS9oaWppbmtzLWEtd29yZHByZXNzLWJhc2ljLWZyYW1ld29yay8=">Hijinks WordPress theme</a>, which is the exact same theme I use for all the WordPress sites I code.</p><h3>Other Languages/Platforms</h3><p>I&#8217;ve also been experiencing with other languages and CMS&#8217;s and here are some books on those topics as well:</p><p><strong>WordPress</strong></p><p>I actually didn&#8217;t start WordPress development until the very end of 2009, I can&#8217;t believe how far I&#8217;ve come in learning!</p><ul><li><a
href="http://www.amberweinberg.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5hbWJlcndlaW5iZXJnLmNvbS9kaWdnaW5nLXdvcmRwcmVzcy1yZXZpZXctZ2l2ZWF3YXkv">Digging Into WordPress</a></li></ul><p><strong>Objective C</strong><br
/> I spent most of the spring, summer and beginning of the fall reading this book. I&#8217;m still no where near to making my own apps, but the foundation is there.</p><ul><li><a
href="http://www.amberweinberg.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5hbWJlcndlaW5iZXJnLmNvbS9iZWdpbm5pbmctaXBob25lLTMtZGV2ZWxvcG1lbnQtZXhwbG9yaW5nLXRoZS1pcGhvbmUtc2RrLw==">Beginning iPhone3 Development</a></li></ul><p><strong>jQuery</strong><br
/> This book has allowed me to start writing my own jQuery from scratch. No longer do I have to haggle with plugins or ask the fiance to do it for me.</p><ul><li><a
href="http://www.amberweinberg.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5hbWJlcndlaW5iZXJnLmNvbS9qcXVlcnktbm92aWNlLXRvLW5pbmphLw==">jQuery Novice to Ninja</a></li></ul><h3>What about you?</h3><p>What are some of the things you&#8217;ve learned this year in order to make yourself better for the next?</p> <img
src="http://www.amberweinberg.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=3812" width="1" height="1" style="display: none;" />]]></content:encoded> <wfw:commentRss>http://www.amberweinberg.com/becoming-a-better-developer-for-2011/feed/</wfw:commentRss> <slash:comments>11</slash:comments> </item> <item><title>jQuery: Novice To Ninja</title><link>http://www.amberweinberg.com/jquery-novice-to-ninja/</link> <comments>http://www.amberweinberg.com/jquery-novice-to-ninja/#comments</comments> <pubDate>Wed, 15 Dec 2010 14:30:08 +0000</pubDate> <dc:creator>Amber Weinberg</dc:creator> <category><![CDATA[blog]]></category> <category><![CDATA[development]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[reviews]]></category><guid
isPermaLink="false">http://www.amberweinberg.com/?p=3741</guid> <description><![CDATA[After messing with Objective-C and iPhone apps all summer, I decided to take a break and learn something fun and that I can use with my clients now. Advanced jQuery has been something I&#8217;ve been wanting to learn for some time now. While I understood the basics, as far as implementing and skinning existing plugins, [...]]]></description> <content:encoded><![CDATA[<p>After messing with Objective-C and iPhone apps all summer, I decided to take a break and learn something fun and that I can use with my clients now. Advanced jQuery has been something I&#8217;ve been wanting to learn for some time now. While I understood the basics, as far as implementing and skinning existing plugins, I got tired of sending my jQuery projects to other developers and thought I&#8217;d put this head to good use.</p><p>I picked up a copy of <a
href="http://www.amberweinberg.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5hbWF6b24uY29tL2dwL3Byb2R1Y3QvMDk4MDU3Njg1Nz9pZT1VVEY4JmFtcDt0YWc9cG9ydG9mYW1iZXdlaS0yMCZhbXA7bGlua0NvZGU9YXMyJmFtcDtjYW1wPTE3ODkmYW1wO2NyZWF0aXZlPTM5MDk1NyZhbXA7Y3JlYXRpdmVBU0lOPTA5ODA1NzY4NTc=">jQuery: Novice to Ninja</a> both because it was free and because I heard it was one of the best books on the subject. My review of this book is sort of split half and half. I give the first half of the book <strong>5 stars</strong>&#8230;and the other half&#8230;<strong>3 stars</strong>, only because it began to delve into things that didn&#8217;t interest me.</p><h3>The Facts</h3><p><a
href="http://www.amberweinberg.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5hbWF6b24uY29tL2dwL3Byb2R1Y3QvMDk4MDU3Njg1Nz9pZT1VVEY4JmFtcDt0YWc9cG9ydG9mYW1iZXdlaS0yMCZhbXA7bGlua0NvZGU9YXMyJmFtcDtjYW1wPTE3ODkmYW1wO2NyZWF0aXZlPTM5MDk1NyZhbXA7Y3JlYXRpdmVBU0lOPTA5ODA1NzY4NTc=">jQuery: Novice to Ninja</a> is written by Earl Castledine and published by <a
href="http://www.amberweinberg.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5zaXRlcG9pbnQuY29tLw==">Sitepoint</a>. The book is 407 pages long, 330ish of that being the actual book, and the rest if the pages at the end of the book contained a bunch of great resources. I had the PDF version, so I can&#8217;t comment on print or paper quality, but the PDF was laid out nicely and easy to read.</p><h3>My Thoughts</h3><p>The first part of the book was phenomenal awesome. After the first few chapters, I could understand and write jQuery syntax, I knew all of the basic animations and selectors, and could write my own plugins, including dropdowns, tabs, sliding div books and other effects. I learned the most about jQuery in these first few chapters.</p><p>In my opinion, the second half of the book was filled with things that you can easily find plugins for. Although I now tend to write my own tabs because of how quick it takes, I&#8217;m more apt to look for an existing plugin before I sit down for a long amount of time to write a custom one. It saves my client money and myself sanity and makes everyone around happy. Of course, I know that most of the examples were there to simply to teach the reader how they work and how to write custom code, I simply wasn&#8217;t too interested in this part.</p><h3>The Big Let Down</h3><p>One major let down of <a
href="http://www.amberweinberg.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5hbWF6b24uY29tL2dwL3Byb2R1Y3QvMDk4MDU3Njg1Nz9pZT1VVEY4JmFtcDt0YWc9cG9ydG9mYW1iZXdlaS0yMCZhbXA7bGlua0NvZGU9YXMyJmFtcDtjYW1wPTE3ODkmYW1wO2NyZWF0aXZlPTM5MDk1NyZhbXA7Y3JlYXRpdmVBU0lOPTA5ODA1NzY4NTc=">jQuery: Novice to Ninja</a>, is that it really wasn&#8217;t a follow along coding book per se, they didn&#8217;t really take you step by step through the entire plugin from start to finish. Instead, they only gave excerpts from the code and expected you to download the code off their site, and replace it with each project&#8230;this was simply too much work which ultimately helped to lead to skinning of the last part of the book.</p><p>I would have prefer if they&#8217;d laid out all of the code in the book itself, so I could follow along and type the examples, instead of having to copy and paste excerpts and guess which parts were needed. This was a huge pain, especially as the examples and projects became a lot longer.</p><h3>Worth a Buy?</h3><p>If you&#8217;re a beginner and wanting to learn the basics, the first have of the book will serve you very well. If you&#8217;re wanting to go all the way or already know the basics, the second half of the book will quench your thirst for jQuery goodness. Either way, I recommend it as an awesome after-work read.</p><p><strong>You can find it on <a
href="http://www.amberweinberg.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5hbWF6b24uY29tL2dwL3Byb2R1Y3QvMDk4MDU3Njg1Nz9pZT1VVEY4JmFtcDt0YWc9cG9ydG9mYW1iZXdlaS0yMCZhbXA7bGlua0NvZGU9YXMyJmFtcDtjYW1wPTE3ODkmYW1wO2NyZWF0aXZlPTM5MDk1NyZhbXA7Y3JlYXRpdmVBU0lOPTA5ODA1NzY4NTc=">Amazon</a> for $35.51</strong></p> <img
src="http://www.amberweinberg.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=3741" width="1" height="1" style="display: none;" />]]></content:encoded> <wfw:commentRss>http://www.amberweinberg.com/jquery-novice-to-ninja/feed/</wfw:commentRss> <slash:comments>12</slash:comments> </item> <item><title>Easy WordPress DropDown Menus</title><link>http://www.amberweinberg.com/easy-wordpress-dropdown-menus/</link> <comments>http://www.amberweinberg.com/easy-wordpress-dropdown-menus/#comments</comments> <pubDate>Mon, 25 Oct 2010 14:30:59 +0000</pubDate> <dc:creator>Amber Weinberg</dc:creator> <category><![CDATA[blog]]></category> <category><![CDATA[development]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[HTML]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[tutorial]]></category> <category><![CDATA[wordpress]]></category><guid
isPermaLink="false">http://www.amberweinberg.com/?p=3604</guid> <description><![CDATA[I&#8217;ve always been a huge fan of WordPress because they make everything so easy for developers. The dropdown menu is no exception. By using WordPress&#8217;s standard wp_list_pages or WordPress 3&#8242;s wp_nav_menu menu functions, we can easily create different kinds of dropdowns for our clients. Today I&#8217;d like for us to take a look at two [...]]]></description> <content:encoded><![CDATA[<p>I&#8217;ve always been a huge fan of WordPress because they make everything so easy for developers. The dropdown menu is no exception. By using WordPress&#8217;s standard <code>wp_list_pages</code> or WordPress 3&#8242;s <code>wp_nav_menu</code> menu functions, we can easily create different kinds of dropdowns for our clients.</p><p>Today I&#8217;d like for us to take a look at two popular types of dropdowns: one based on CSS only, and another based on jQuery.</p><h3>The Standard WordPress navigation layout</h3><p>Before we get into making dropdowns, we need to take a look at the way WordPress layouts it&#8217;s navigation. Both <code>wp_list_pages</code> and <code>wp_nav_menu</code> lay out their menus pretty much exactly the same, besides different class names, so we&#8217;ll just take a look at <code>wp_nav_menu</code> &#8216;s printed code:</p><div
class="wp_syntax"><div
class="code"><pre class="html" style="font-family:monospace;">&lt;ul class=&quot;menu&quot; id=&quot;menu-main-menu&quot;&gt;
&lt;li class=&quot;menu-item menu-item-type-post_type menu-item-131&quot; id=&quot;menu-item-131&quot;&gt;&lt;a href=&quot;#&quot;&gt;Link&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;menu-item menu-item-type-taxonomy menu-item-132&quot; id=&quot;menu-item-132&quot;&gt;&lt;a href=&quot;#&quot;&gt;Link&lt;/a&gt;
&lt;ul class=&quot;sub-menu&quot;&gt;
	&lt;li class=&quot;menu-item menu-item-type-taxonomy menu-item-140&quot; id=&quot;menu-item-140&quot;&gt;&lt;a href=&quot;#&quot;&gt;Link&lt;/a&gt;&lt;/li&gt;
	&lt;li class=&quot;menu-item menu-item-type-taxonomy menu-item-139&quot; id=&quot;menu-item-139&quot;&gt;&lt;a href=&quot;#&quot;&gt;Link&lt;/a&gt;&lt;/li&gt;
	&lt;li class=&quot;menu-item menu-item-type-taxonomy menu-item-142&quot; id=&quot;menu-item-142&quot;&gt;&lt;a href=&quot;#&quot;&gt;Link&lt;/a&gt;&lt;/li&gt;
	&lt;li class=&quot;menu-item menu-item-type-taxonomy menu-item-144&quot; id=&quot;menu-item-144&quot;&gt;&lt;a href=&quot;#&quot;&gt;Link&lt;/a&gt;&lt;/li&gt;
	&lt;li class=&quot;menu-item menu-item-type-taxonomy menu-item-138&quot; id=&quot;menu-item-138&quot;&gt;&lt;a href=&quot;#&quot;&gt;Link&lt;/a&gt;&lt;/li&gt;
	&lt;li class=&quot;menu-item menu-item-type-taxonomy menu-item-141&quot; id=&quot;menu-item-141&quot;&gt;&lt;a href=&quot;#&quot;&gt;Link&lt;/a&gt;&lt;/li&gt;
	&lt;li class=&quot;menu-item menu-item-type-taxonomy menu-item-143&quot; id=&quot;menu-item-143&quot;&gt;&lt;a href=&quot;#&quot;&gt;Link&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;menu-item menu-item-type-post_type menu-item-133&quot; id=&quot;menu-item-133&quot;&gt;&lt;a href=&quot;#&quot;&gt;Link&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;menu-item menu-item-type-post_type menu-item-134&quot; id=&quot;menu-item-134&quot;&gt;&lt;a href=&quot;#&quot;&gt;Link&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;menu-item menu-item-type-custom menu-item-135&quot; id=&quot;menu-item-135&quot;&gt;&lt;a href=&quot;#&quot;&gt;Link&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</pre></div></div><p>As you can see, WordPress neatly (well neat besides all of the classes) layouts out the menu in a nice semantic list, with the children of the navigation nested inside of it&#8217;s parent li. This allows us to use both CSS and/or jQuery to make our dropdowns work!</p><h3>DropDowns with CSS Only</h3><p>CSS only dropdowns are my favorite, as they allow you the functionality without the use of more Javascript. This means the sites loads faster and works if the user has JS turned off.</p><p>CSS only dropdowns work in IE7+ and all other modern browsers, so it&#8217;s the perfect way to go!</p><p>Since the HTML is already down for us, we just need to get the CSS itself going. Let&#8217;s start out by formatting our menu a bit, so the li&#8217;s float together, and have some space in between:</p><div
class="wp_syntax"><div
class="code"><pre class="css" style="font-family:monospace;">ul<span style="color: #6666ff;">.menu</span><span style="color: #00AA00;">,</span> ul<span style="color: #6666ff;">.menu</span> li <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
ul<span style="color: #6666ff;">.menu</span> li <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">15px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div><p>Next, we should hide the sub-menu, so that only our top level items show:</p><div
class="wp_syntax"><div
class="code"><pre class="css" style="font-family:monospace;">ul<span style="color: #6666ff;">.menu</span><span style="color: #00AA00;">,</span> ul<span style="color: #6666ff;">.menu</span> li <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
ul<span style="color: #6666ff;">.menu</span> li <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">15px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.sub-menu</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div><p>Now we need to show the sub menu, when we hover over it&#8217;s parent link:</p><div
class="wp_syntax"><div
class="code"><pre class="css" style="font-family:monospace;">ul<span style="color: #6666ff;">.menu</span><span style="color: #00AA00;">,</span> ul<span style="color: #6666ff;">.menu</span> li <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
ul<span style="color: #6666ff;">.menu</span> li <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">15px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.sub-menu</span> li <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
ul<span style="color: #6666ff;">.menu</span> li<span style="color: #3333ff;">:hover </span>li <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div><p>If you go ahead and test it, you can see it works, but it breaks the rest of our navigation! We need to apply a few more basic styles, so when hovering over the sub li items, it doesn&#8217;t push over the rest of the menu.</p><div
class="wp_syntax"><div
class="code"><pre class="css" style="font-family:monospace;">ul<span style="color: #6666ff;">.menu</span><span style="color: #00AA00;">,</span> ul<span style="color: #6666ff;">.menu</span> li <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
ul<span style="color: #6666ff;">.menu</span> li <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">15px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">list-style</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.sub-menu</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span> 
<span style="color: #6666ff;">.sub-menu</span> li <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
ul<span style="color: #6666ff;">.menu</span> li<span style="color: #3333ff;">:hover </span>li <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">both</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div><p><a
href="http://www.amberweinberg.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5hbWJlcndlaW5iZXJnLmNvbS9kZW1vcy9jc3Nkcm9wLnBocA==">View the demo</a></p><h3>DropDowns With jQuery</h3><p> For all you jQuery fans, there&#8217;s also an easy way to implement WordPress menus with jQuery dropdowns. jQuery allows you to get a bit more fancy, by adding speeds and fades to the animation. It&#8217;s also useful if you&#8217;re still stuck supporting IE6.</p><p>Let&#8217;s take the basic CSS from the tutorial above and shed it down to just what we need for jQuery to work and the presentation to look nice:</p><div
class="wp_syntax"><div
class="code"><pre class="css" style="font-family:monospace;">ul li <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">list-style</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
ul ul <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">visibility</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
ul ul li <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">static</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div><p>Upon testing, you can see it looks pretty much the same, except that hover over the li with the sub-menu no longer shows the sub items.</p><p>First, make sure you attach a copy of jQuery to your document:</p><div
class="wp_syntax"><div
class="code"><pre class="html" style="font-family:monospace;">&lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js&quot;&gt;&lt;/script&gt;</pre></div></div><p>Now for our jQuery:</p><div
class="wp_syntax"><div
class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script<span style="color: #339933;">&gt;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;ul li&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hover</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;hover&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'ul:first'</span><span style="color: #339933;">,</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'visibility'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'visible'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">removeClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;hover&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'ul:first'</span><span style="color: #339933;">,</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'visibility'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'hidden'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div><p>Test it and voila! You can also add fades and other animations to it.</p><p><a
href="http://www.amberweinberg.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5hbWJlcndlaW5iZXJnLmNvbS9kZW1vcy9qcXVlcnlkcm9wLnBocA==">View the Demo</a></p> <img
src="http://www.amberweinberg.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=3604" width="1" height="1" style="display: none;" />]]></content:encoded> <wfw:commentRss>http://www.amberweinberg.com/easy-wordpress-dropdown-menus/feed/</wfw:commentRss> <slash:comments>12</slash:comments> </item> <item><title>Validation Is Still Relevant</title><link>http://www.amberweinberg.com/validation-is-still-relevent/</link> <comments>http://www.amberweinberg.com/validation-is-still-relevent/#comments</comments> <pubDate>Thu, 07 Oct 2010 14:30:44 +0000</pubDate> <dc:creator>Amber Weinberg</dc:creator> <category><![CDATA[blog]]></category> <category><![CDATA[development]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[CSS3]]></category> <category><![CDATA[HTML]]></category> <category><![CDATA[iphone]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[rant]]></category> <category><![CDATA[validation]]></category><guid
isPermaLink="false">http://www.amberweinberg.com/?p=3528</guid> <description><![CDATA[I was listening to a Sitepoint podcast when they started talking about whether they still validate their HTML or not. This being my expertise, I quickly perked up my ears to listen to what the &#8220;experts&#8221; were saying. And I was disappointed. Perhaps the guys who take care of the podcast aren&#8217;t coders, or aren&#8217;t [...]]]></description> <content:encoded><![CDATA[<p>I was listening to a Sitepoint podcast when they started talking about whether they still validate their HTML or not. This being my expertise, I quickly perked up my ears to listen to what the &#8220;experts&#8221; were saying. And I was disappointed.</p><p>Perhaps the guys who take care of the podcast aren&#8217;t coders, or aren&#8217;t front-end developers, and if that&#8217;s the case, then I forgive them for their validation transgressions. I just hope they really aren&#8217;t front-end developers&#8230;</p><h3>What They Said</h3><p>The guys at Sitepoint admitted they no longer validate their sites, and none of their sites could pass basic validation. They believed that because large sites like Google and Facebook didn&#8217;t validate, why should they? They then commented that validation is no longer important today.</p><h3>Validation Is Important</h3><p>I&#8217;ve always believed that validation is important, especially since I decided to focus my career on front-end development. Surprisingly, this is a source of a lot of debate in the development world, which makes about as much sense to me as policemen disregarding their standard rules.</p><p>Validation is written by the W3C, which takes care of HTML and CSS standards. Validation rules are like guidelines, you don&#8217;t <em>have</em> to do it, but it&#8217;s something you should do.</p><p>Passing validation helps in several ways &#8211; it helps you rule out browser bugs, your code tends to be cleaner in nature, and you help push a browser standard that will make it easier to code for in the future. Think about it &#8211; if developers didn&#8217;t care about following standards, why would browsers? We&#8217;d probably end up back in the Netscape/Internet Explorer days where each browser went off in their own direction in how they rendered items. It would be like hacking and coding for each browser &#8211; and we&#8217;re trying to move away from hacks right? (Which is why I&#8217;m holding off on using HTML5).</p><p>Plus it holds your code to a higher standard and shows you care about quality. Designers don&#8217;t <em>have</em> to use grids or good typography to make a living, both those that do are often more successful. The same with developers. I&#8217;ve actually had clients go through each of my portfolio pieces to see if they validated.</p><h3>Validation Is More Important Than Ever</h3><p>Not only has validation always been important, but it&#8217;s now more important than ever. Even though it can&#8217;t directly affect your SEO, getting rid of extra divs (divitis &amp; semantics related to validation) allows the Google bot to make it through your code easier and ensures they capture all of your content.</p><p>With the proliferation of new kinds of browsers as well (think mobile, iPads &amp; netbooks), validation becomes even more important. I just finished coding a huge mobile site for Audible and encountered several bugs invisible to Firefox and even the desktop version of Safari. Upon glancing at the iPhone, however, you could see huge layout issues. The problem was mismatched tags and improper nesting. Had I not gone and validated the site, I could&#8217;ve been searching for the bug for forever.</p><h3>Resistence</h3><p>I&#8217;ve never understood why a lot of developers never took the extra step to validate their HTML. A lot of the complaints I get about validating, is that it takes <em>forever</em>. However, it should easily take you less than five minutes to validate your code if you learn proper syntax and rules. It&#8217;s easy.</p><p>Of course, there are always exceptions to the rule. When a client insists on a new browser window popup on link, and for some reason you&#8217;re unable to use JS for this, you&#8217;ll often find yourself using target=_blank and that&#8217;s ok every once in awhile, although you should try to deter the client from new browser windows due to user annoyance.</p><p>I will admit that I don&#8217;t bother validating my CSS. Before CSS3 I never really had any CSS validation errors, and if I did it was easy to tell by the messed up website. Now that I use a lot of CSS3 and vendor prefixes, I don&#8217;t even bother to look. But these aren&#8217;t improper syntaxes or hacks &#8211; they&#8217;re still valid code.</p><h3>Your Thoughts</h3><p>Do you validate your code? Why or why not?</p> <img
src="http://www.amberweinberg.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=3528" width="1" height="1" style="display: none;" />]]></content:encoded> <wfw:commentRss>http://www.amberweinberg.com/validation-is-still-relevent/feed/</wfw:commentRss> <slash:comments>38</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 1/30 queries in 0.022 seconds using disk: basic
Object Caching 473/536 objects using disk: basic

Served from: www.amberweinberg.com @ 2012-02-04 03:58:31 -->
