<?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>Atomic Robot Design &#187; css</title>
	<atom:link href="http://atomicrobotdesign.com/blog/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://atomicrobotdesign.com/blog</link>
	<description>Design From The Future &#124; Blog</description>
	<lastBuildDate>Thu, 03 May 2012 04:33:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>I can’t think of a reason why 3000 lines of CSS would be better than 100 lines of JavaScript</title>
		<link>http://atomicrobotdesign.com/blog/web-development/i-cant-think-of-a-reason-why-3000-lines-of-css-would-be-better-than-100-lines-of-javascript/</link>
		<comments>http://atomicrobotdesign.com/blog/web-development/i-cant-think-of-a-reason-why-3000-lines-of-css-would-be-better-than-100-lines-of-javascript/#comments</comments>
		<pubDate>Wed, 22 Jun 2011 02:35:11 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://atomicrobotdesign.com/blog/?p=1118</guid>
		<description><![CDATA[Don’t get me wrong, I love CSS and I’m a huge fan of the potential of CSS animations but when I see something like this, I wonder if someone is missing the point. The fact that you could make a &#8230; <a href="http://atomicrobotdesign.com/blog/web-development/i-cant-think-of-a-reason-why-3000-lines-of-css-would-be-better-than-100-lines-of-javascript/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Don’t get me wrong, I love CSS and I’m a huge fan of the potential of CSS animations but when I see something like <a href="http://jsdo.it/GeckoTang/onyd">this</a>, I wonder if someone is missing the point. The fact that you could make a rudimentary game like that with just CSS is pretty amazing but in terms of the real world, it’s pretty useless. Blah blah, Mike, you’re just lame and don’t get it, right? No, I get it, it’s like when people were making the solar system or the Mac OSX dock using CSS3. It’s just to show what you can do now with this new and wonderful technology. But this isn’t what CSS is for and I’m afraid that if people keep building things like this, CSS might go down a path we don’t want it to.</p>
<p>Really, my problem isn’t even with a game being made with CSS. It’s more with the fact that as I get more experienced in the web development world, the less I care about almost useless demos. They’re fun but I’ve come to agree with Ian and Seb over at the <a href="http://creativecodingpodcast.com/">Creative Coding Podcast</a>, that building cool but unpractical demos has it’s own group of developers. They make interesting stuff but how many particle emitters do we need? I’d include in this group the people that make demos that only work in one browser or even just in the Webkit nightly build. I’ve talked about this before, but really, what good is anything that only works in one browser?</p>
<p>I get it, some developers like the challenge of building something like this. But it reminds me of the trend that existed in web design for a while (and to a degree still does with Dribbble) where designers designed things to impress other designers. There was a lot of cool stuff being made but it was just there to impress people.</p>
<p>Back to my original statement in the post’s headline. I really can’t think of any reason why you’d what to build something that would take at the most a hundred lines of JavaScript with thousands of lines of CSS instead. The hacks needed to create the click events are enough for me to not want to ever build something like this. All the enemies are radio buttons! Maybe I’m missing something but I’d rather spend my time making a kick ass game using canvas and JS then trying to hack together something like this.</p>
]]></content:encoded>
			<wfw:commentRss>http://atomicrobotdesign.com/blog/web-development/i-cant-think-of-a-reason-why-3000-lines-of-css-would-be-better-than-100-lines-of-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My quest to find the right code editor</title>
		<link>http://atomicrobotdesign.com/blog/general/my-quest-to-find-the-right-code-editor/</link>
		<comments>http://atomicrobotdesign.com/blog/general/my-quest-to-find-the-right-code-editor/#comments</comments>
		<pubDate>Mon, 28 Feb 2011 02:04:53 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[code editor]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://atomicrobotdesign.com/blog/?p=927</guid>
		<description><![CDATA[When I went to school to learn web design and development, it was right around the time when it became a matter of pride to say that you hand coded your work, that you didn’t use a WYSIWYG editor like &#8230; <a href="http://atomicrobotdesign.com/blog/general/my-quest-to-find-the-right-code-editor/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When I went to school to learn web design and development, it was right around the time when it became a matter of pride to say that you hand coded your work, that you didn’t use a WYSIWYG editor like Dreamweaver has the reputation to be. Of course, since I was just getting into the web development world and my teachers taught us to make our first web sites using Notepad, the idea of using a WYSIWYG was and always has been completely foreign to me. Eventually, I moved on to using the code editor in Dreamweaver to do my HTML and CSS coding because I loved the code hinting. And I kept on using Dreamweaver until maybe six months ago. Why? I think I’ve said before, I find one thing that helps me code effectively is working in a comfortable atmosphere and since I’d been using Dreamweaver for so long, I had not yet found a code editor that could replace it for me.</p>
<p>Eventually, I came across <a href="http://www.activestate.com/komodo-edit">Komodo Edit</a>, which replaced Dreamweaver for me as my main editor. I love that it’s pretty light weight, free and has code hinting for everything from HTML5 to jQuery. I can’t say that I have any real complaints. It’s open source and there’s a pretty good community around it.</p>
<p>But before I came across Komodo Edit, I gave a ton of editors a chance. <a href="http://www.aptana.com/">Aptana</a> is OK but it can really start to run slow after a while and anyone who’s been in a hardcore coding stretch, it really sucks when your editor starts to slow down. I did a couple of video tutorial series on JavaScript and the host was using Microsoft’s <a href="http://www.microsoft.com/express/Web/">Visual Web Developer</a>, which I tried out, but it just has the feeling that it’s made to work with Microsoft technologies like .Net and I could never just get comfortable with it. Microsoft came out with <a href="http://www.microsoft.com/web/webmatrix/">Web Matrix</a>, which I gave a shot, and while it wasn’t bad, it just didn’t have some of the features I have become used to in a code editor.</p>
<p>I work on a computer running Windows, so I have to admit, when watching video tutorials where the host uses Textmate, sometimes I’d just a bit jealous because of some of the features it has that none of the editors I’ve used on Windows has. That was until I came across <a href="http://www.e-texteditor.com/">E</a>, a text editor for Windows that has, as far as I can tell, all the same features as Textmate. I’ve been playing around with it for the last couple of days and so far I’ve enjoyed it. But there’s one problem, it doesn’t have code hinting.</p>
<p>Komodo Edit has plug-ins that add some of the Textmate features I want, like using tab to insert code snippets, but it doesn’t work quite how I’d like and because most of the snippets that are included aren’t set up the way I’d like and it changes some of the functionality in ways that I’m not a fan of. I’m going to give E a chance but I’m not sure if I’m going to able to live without code hinting, it just speeds everything up so much and I’ve gotten so used to it.</p>
<p>I still firmly believe that what you use to build with doesn’t really matter, what matters is the end product, whether it’s an app or a website. I’m just searching for the right one for me. In fact, I shouldn’t have been surprised, but it seems most developers are as passionate about what editor they use as they are about what languages they use. </p>
]]></content:encoded>
			<wfw:commentRss>http://atomicrobotdesign.com/blog/general/my-quest-to-find-the-right-code-editor/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sometimes it’s the simpler things (Or how jQuery has warped my brain)</title>
		<link>http://atomicrobotdesign.com/blog/htmlcss/sometimes-its-the-simpler-things-or-how-jquery-has-warped-my-brain/</link>
		<comments>http://atomicrobotdesign.com/blog/htmlcss/sometimes-its-the-simpler-things-or-how-jquery-has-warped-my-brain/#comments</comments>
		<pubDate>Wed, 26 Jan 2011 03:00:08 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://atomicrobotdesign.com/blog/?p=863</guid>
		<description><![CDATA[I was reading an interview on .net magazine with Dan Cederholm, the creator of Dribbble among other things. Dan runs a studio called SimpleBits and after reading the interview, I went to his site to check it out. For some &#8230; <a href="http://atomicrobotdesign.com/blog/htmlcss/sometimes-its-the-simpler-things-or-how-jquery-has-warped-my-brain/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I was reading an interview on <a href="http://www.netmag.co.uk/">.net magazine</a> with <a href="http://www.netmag.co.uk/zine/discover-interview/dan-cederholm">Dan Cederholm</a>, the creator of <a href="http://dribbble.com/">Dribbble</a> among other things. Dan runs a studio called <a href="http://simplebits.com/">SimpleBits</a> and after reading the interview, I went to his site to check it out. For some reason, I resized my browser window and I noticed something. If you change the width of your browser, the background of the SimpleBits website moves in the opposite direction.</p>
<p>I thought, “How is that done? It must be jQuery or something.” There’s jQuery being used on the site, but it’s simple stuff that is used for some hover animations and class changes, but nothing about positioning the background. So I decided to check out the CSS. And I was a bit surprised to see how simple the effect was to produce.</p>
<div class="codecolorer-container css twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">background.jpg</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">repeat</span> <span style="color: #933;">-50%</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333;">fixed</span><span style="color: #00AA00;">;</span></div></td></tr></tbody></table></div>
<p>To create the effect, all you need to do is set the background’s x position to negative 50% and then when the browser is resized, it will move in the opposite direction. After I saw that, I realized, of course, that’s how you would do it, but I think because I’m so used to see effects done with jQuery or CSS3, that it didn’t cross my mind that it could be this simple.</p>
<p>I don’t know if it’s a bad thing that my first guess was jQuery, but I think that it’s reminded me, that while things like jQuery are great, sometimes there’s a simpler way to do it. If I can do it with CSS and not use JavaScript, then that’s been the way that I’ve tried to go. I’ve been really excited about CSS3 and what it lets me do, but I need to remember that we can still do cool things with the CSS that works in all browsers. And when it’s something as simple as that, it makes it even more interesting.</p>
]]></content:encoded>
			<wfw:commentRss>http://atomicrobotdesign.com/blog/htmlcss/sometimes-its-the-simpler-things-or-how-jquery-has-warped-my-brain/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CSS3 Animation vs jQuery Animation</title>
		<link>http://atomicrobotdesign.com/blog/htmlcss/css3-animation-vs-jquery-animation/</link>
		<comments>http://atomicrobotdesign.com/blog/htmlcss/css3-animation-vs-jquery-animation/#comments</comments>
		<pubDate>Tue, 21 Dec 2010 04:03:37 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://atomicrobotdesign.com/blog/?p=791</guid>
		<description><![CDATA[With CSS3 transition support in Firefox 4, I’m happy that eventually we’ll need to rely on JavaScript for one less thing. But, of course, right now CSS3 transitions are only supported in Webkit browsers, Firefox 4 and Opera. Internet Explorer &#8230; <a href="http://atomicrobotdesign.com/blog/htmlcss/css3-animation-vs-jquery-animation/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>With CSS3 transition support in Firefox 4, I’m happy that eventually we’ll need to rely on JavaScript for one less thing. But, of course, right now CSS3 transitions are only supported in Webkit browsers, Firefox 4 and Opera. Internet Explorer 9 doesn’t have CSS3 transition support right now, as far as I know, so, like with most cutting edge web development, full support is a while off.</p>
<p>But I was wondering, if there was a difference in using jQuery for animation as opposed to the new CSS3 transitions. When you check out the <a href="http://atomicrobotdesign.com/blog_media/css3-vs-jquery.html">test page</a> I’ve made, you can see, there’s not really that much difference in the results, except putting in the same numbers in gets you slightly different end positions. And, since we still need to use JavaScript to trigger the CSS3 animation, we don’t really save any lines of code, we just move a couple of lines from JS to CSS.</p>
<p>Seeing that there’s really no difference in the results, I would eventually prefer to use CSS for things like this, when, of course, it’s supported in all browsers. Why? Well, for the most part, 99% of websites we build will have CSS for style and positioning, so creating the animation with a file that’s going to be loaded already means less requests and that’s a good thing. Less HTTP requests means less chance something might not be loaded.</p>
<p>Of course, with Firefox 4 still being in beta and Internet Explorer 9 not supporting CSS3 transitions at all, I think jQuery and JavaScript built animations are going to be around for a while at least. Personally, if I have the time when working on a project, I’d go the same route as <a href="http://hardboiledwebdesign.com/">Hardboiled Web Design</a> did in his old design (before he went the copy Apple’s nav route so many, many sites go) where he used CSS3 animation to move a character if your browser supported it, if not, he used jQuery.</p>
]]></content:encoded>
			<wfw:commentRss>http://atomicrobotdesign.com/blog/htmlcss/css3-animation-vs-jquery-animation/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How the hell did I become a JavaScript fan?</title>
		<link>http://atomicrobotdesign.com/blog/general/how-the-hell-did-i-become-a-javascript-fan/</link>
		<comments>http://atomicrobotdesign.com/blog/general/how-the-hell-did-i-become-a-javascript-fan/#comments</comments>
		<pubDate>Mon, 13 Dec 2010 06:20:17 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://atomicrobotdesign.com/blog/?p=780</guid>
		<description><![CDATA[If you had told me a year ago, or even six months ago, that I’d spend an entire day working with JavaScript and I’d enjoy it, I would have called you completely insane. Until recently, I was not a fan &#8230; <a href="http://atomicrobotdesign.com/blog/general/how-the-hell-did-i-become-a-javascript-fan/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you had told me a year ago, or even six months ago, that I’d spend an entire day working with JavaScript and I’d enjoy it, I would have called you completely insane. Until recently, I was not a fan of JavaScript, in fact, I avoided using it if I could. If I couldn’t build it with HTML/CSS then I built it in Flash. But once Google release Chrome, I started to see what you could do with JS and I began rethinking my position on it. I’ll admit when Apple trashed Flash, I was firmly in the “Flash isn’t dead and it and HTML5 can co-exist on the web” camp. In fact, I probably leaned back to the Flash side because of the anti-Flash attitudes some people had.</p>
<p>But I kept looking into JavaScript and got really excited about jQuery. jQuery is the perfect gateway drug to JS, I think. It allows you to get projects up and running quickly, and for me at least, it made me want to learn more straight JavaScript. Now I find myself trying to figure out a way to include some JavaScript effect into every site I work on.</p>
<p>I don’t think that JavaScript itself won me over, it’s the fact that the modern version of all the major browsers allow you to build things that would be nearly impossible without a plug-in a few years ago. But now, for a lot of effects like an animated drop down navigation, you just need to link to a JavaScript file and, bang, you’ve got the effect you’re after.</p>
<p>Plus, I think with JavaScript and ActionScript both being based on ECMAscript, learning one after being familiar with the other makes it really a situation of learning the differences between the languages than anything else. So switching my focus has been pretty easy for me but it has been without some frustration. Not strong typing variables took a bit of getting used to.</p>
<p>I still can’t believe that I get excited about JavaScript heavy projects but I think that the leaning of the web to move from plug-ins to browsers for dynamic website experiences has been a good thing. Plus, it’s taught me that as a web developer, you shouldn’t limit yourself to one or two technologies. Honestly, for the longest time, I was hoping that Flash would take over for HTML because of the crazy dynamic things you could build with it. But now, thanks to the innovations by Chrome and Firefox, it can be done with HTML/CSS/JS, which means you can build a great website experience with a text editor as simple as Notepad. Which is pretty cool when you think about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://atomicrobotdesign.com/blog/general/how-the-hell-did-i-become-a-javascript-fan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>If you do something cool with HTML/CSS/JS, remember a right-click means everyone else can do it</title>
		<link>http://atomicrobotdesign.com/blog/web-development/if-you-do-something-cool-with-htmlcssjs-remember-a-right-click-means-everyone-else-can-do-it/</link>
		<comments>http://atomicrobotdesign.com/blog/web-development/if-you-do-something-cool-with-htmlcssjs-remember-a-right-click-means-everyone-else-can-do-it/#comments</comments>
		<pubDate>Sun, 14 Nov 2010 23:53:19 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://atomicrobotdesign.com/blog/?p=749</guid>
		<description><![CDATA[In the last couple of days, I came across two web pages that do something cool, not entirely useful, but fun and eye catching. The first one was a simple Flash page, chrismckenzie.com. It doesn’t do much, just a block &#8230; <a href="http://atomicrobotdesign.com/blog/web-development/if-you-do-something-cool-with-htmlcssjs-remember-a-right-click-means-everyone-else-can-do-it/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In the last couple of days, I came across two web pages that do something cool, not entirely useful, but fun and eye catching. The first one was a simple Flash page, <a href="http://chrismckenzie.com/">chrismckenzie.com</a>. It doesn’t do much, just a block that follows your cursor around the page and then becomes sad and looks everywhere if it leaves the browser window. It’s fun and something that I’ve sent to others to check out and I think that’s the entire point of the page. The other thing I came across was the latest Mr. Doob experiment, a <a href="http://mrdoob.com/130/Voxels_HTML5">rotating view of 3D blocks</a> built with HTML5 and JavaScript.</p>
<p>This isn’t a Flash vs HTML5 post, this is a “Remember, open web means everyone can see inside the machine” post. Most of Mr. Doob’s stuff is crazy complex and if you can figure out how it works, it’s going to take a while. But that’s the point, no matter who you are, you can take a look inside and see what’s going on. And even if you don’t understand it or how it works, most of this stuff can be copy and pasted and used by anyone. When I went to Chris McKenzie’s site, I’ll admit, I’d love to know how he made it but it would require some research that I don’t have the time or patience for right now. Yes, I know I could use a decompiler for Flash, but it’s kind of a pain, plus you have to pay for the good ones, which I don’t want to do.</p>
<p>I’m not in anyway saying developers shouldn’t be building their stuff with HTML5 and JS. I’m saying that if it’s something that you want to use to attract clients, something only you know how to build, if you build it in HTML5, it’s going to be pretty hard to stop other people from figuring out how it works. At the same time, I’ve built things and explained out to make things here on my blog because I want the web to be a better place and showing people a better way to make CSS3 buttons isn’t going to cost me anything and might make some other sites look better.</p>
<p>This is a wonderful time to be a web developer, with a great community sharing some amazing things and the web technologies allowing us to push what we can do. But I’ve read of situations where Flash/Flex developers have complained about other decompiling their work and using it without permission and I would hate to see something like that start to happen with the open web.</p>
]]></content:encoded>
			<wfw:commentRss>http://atomicrobotdesign.com/blog/web-development/if-you-do-something-cool-with-htmlcssjs-remember-a-right-click-means-everyone-else-can-do-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fun with CSS3 Transform and some jQuery too</title>
		<link>http://atomicrobotdesign.com/blog/htmlcss/fun-with-css3-transform-and-some-jquery-too/</link>
		<comments>http://atomicrobotdesign.com/blog/htmlcss/fun-with-css3-transform-and-some-jquery-too/#comments</comments>
		<pubDate>Wed, 03 Nov 2010 05:09:20 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://atomicrobotdesign.com/blog/?p=736</guid>
		<description><![CDATA[I am a huge fan of CSS3 transforms and transitions and can’t wait for the day when all the major browsers support them. Why? Well, as great as something like jQuery is, if you want to incorporate a transition or &#8230; <a href="http://atomicrobotdesign.com/blog/htmlcss/fun-with-css3-transform-and-some-jquery-too/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I am a huge fan of CSS3 transforms and transitions and can’t wait for the day when all the major browsers support them. Why? Well, as great as something like jQuery is, if you want to incorporate a transition or animation as part of your design, the less files you have to load, the better. And the main purpose of CSS is to style the HTML, so using CSS for the animation just makes more sense to me. And because the animation is being render by the browser’s CSS engine, so far they’ve been incredibly smooth.</p>
<p>I’ve just been messing around with some transitions made a couple of examples of what you can do. You can check out the demo <a href="http://atomicrobotdesign.com/blog_media/css3_transforms.html">here</a>. </p>
<p>The first example is pure CSS. The animation is triggered by the :active selector which unfortunately won’t let you just click on the div to tigger it. The second example uses jQuery to toggle the a class on and off to trigger the animation. Although I’m using jQuery here, it’s just to trigger the effect, the animation is still 100% CSS.</p>
]]></content:encoded>
			<wfw:commentRss>http://atomicrobotdesign.com/blog/htmlcss/fun-with-css3-transform-and-some-jquery-too/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Make customizable jQuery plug-ins and be more awesome</title>
		<link>http://atomicrobotdesign.com/blog/web-development/make-customizable-jquery-plug-ins-and-be-more-awesome/</link>
		<comments>http://atomicrobotdesign.com/blog/web-development/make-customizable-jquery-plug-ins-and-be-more-awesome/#comments</comments>
		<pubDate>Fri, 22 Oct 2010 05:06:35 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://atomicrobotdesign.com/blog/?p=711</guid>
		<description><![CDATA[The great thing about making you’re own plug-ins is that once you’ve built something, you can easily use it again. But most of the time you’ll want to change some of the settings on your plug-in and it can be &#8230; <a href="http://atomicrobotdesign.com/blog/web-development/make-customizable-jquery-plug-ins-and-be-more-awesome/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The great thing about making you’re own plug-ins is that once you’ve built something, you can easily use it again. But most of the time you’ll want to change some of the settings on your plug-in and it can be annoying to have to edit it every time you use it. With a jQuery plug-in, we can set up the plug-in to accept variables so that we can customize it every time we use it. This is perfect for plug-ins that create pop-up windows or image sliders.</p>
<p>We are going to take the totally usefull plug-in we made <a href="http://atomicrobotdesign.com/blog/web-development/write-your-own-jquery-plug-ins-because-it-will-make-your-life-a-lot-easier/">last time</a> and change it so we can pick the new background color and also so we can set a new width of the div. The HTML and CSS are the same:</p>
<div class="codecolorer-container html4strict twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #00bbdd;">&lt;!DOCTYPE html&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/html.html"><span style="color: #000000; font-weight: bold;">html</span></a> <span style="color: #000066;">lang</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;en&quot;</span>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">head</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/meta.html"><span style="color: #000000; font-weight: bold;">meta</span></a> <span style="color: #000066;">charset</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;utf-8&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/title.html"><span style="color: #000000; font-weight: bold;">title</span></a>&gt;</span>jQuery Plug-in<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/title.html"><span style="color: #000000; font-weight: bold;">title</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/style.html"><span style="color: #000000; font-weight: bold;">style</span></a>&gt;</span><br />
#blue {<br />
&nbsp; width:200px;<br />
&nbsp; height:200px;<br />
&nbsp; background:#00f;<br />
&nbsp; float:left;<br />
&nbsp; margin-right:20px;<br />
}<br />
#red {<br />
&nbsp; width:200px;<br />
&nbsp; height:200px;<br />
&nbsp; background:#f00;<br />
&nbsp; float:left;<br />
}<br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/style.html"><span style="color: #000000; font-weight: bold;">style</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">head</span></a>&gt;</span><br />
<br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">body</span></a>&gt;</span><br />
&nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;blue&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span><br />
&nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;red&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">body</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/html.html"><span style="color: #000000; font-weight: bold;">html</span></a>&gt;</span></div></td></tr></tbody></table></div>
<p>Same as last time, nothing major here. Next we’ll modify our plug-in to allow us to pass in some variables:</p>
<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><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><br />
&nbsp; $.<span style="color: #660066;">fn</span>.<span style="color: #660066;">our_plugin</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>vars<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> &nbsp;<br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> element <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> color <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>vars.<span style="color: #660066;">color</span> <span style="color: #339933;">!=</span> undefined<span style="color: #009900;">&#41;</span> <span style="color: #339933;">?</span> vars.<span style="color: #660066;">color</span> <span style="color: #339933;">:</span> <span style="color: #3366CC;">'#0f0'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> width <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>vars.<span style="color: #660066;">width</span> <span style="color: #339933;">!=</span> undefined<span style="color: #009900;">&#41;</span> <span style="color: #339933;">?</span> vars.<span style="color: #660066;">width</span> <span style="color: #339933;">:</span> <span style="color: #CC0000;">400</span><span style="color: #339933;">;</span> <br />
&nbsp; &nbsp; element.<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><br />
&nbsp; &nbsp; &nbsp; element.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #3366CC;">'background-color'</span> <span style="color: #339933;">:</span> color<span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #3366CC;">'width'</span> <span style="color: #339933;">:</span> width <span style="color: #339933;">+</span> <span style="color: #3366CC;">'px'</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>jQuery<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Ok, so what’s going on here? Well, the first change from our early plug-in is in the second line:</p>
<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$.<span style="color: #660066;">fn</span>.<span style="color: #660066;">our_plugin</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>vars<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div></td></tr></tbody></table></div>
<p>We are passing in our variables from the HTML file through vars. With this we can pass through as many variables as we want to. This time we’re passing two plus the element in the HTML document that we want to affect, this will give us these three variables:</p>
<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">var</span> element <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> color <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>vars.<span style="color: #660066;">color</span> <span style="color: #339933;">!=</span> undefined<span style="color: #009900;">&#41;</span> <span style="color: #339933;">?</span> vars.<span style="color: #660066;">color</span> <span style="color: #339933;">:</span> <span style="color: #3366CC;">'#0f0'</span><span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> width <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>vars.<span style="color: #660066;">width</span> <span style="color: #339933;">!=</span> undefined<span style="color: #009900;">&#41;</span> <span style="color: #339933;">?</span> vars.<span style="color: #660066;">width</span> <span style="color: #339933;">:</span> <span style="color: #CC0000;">400</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>The first one, clicked, is the same as last time, but the other two look a lot different and might be a bit confusing to some one that’s not familiar with JavaScript shorthand. What we are doing here is setting the variable color to what we set color to in the HTML file or else to #0f0. This is the same as an if statement.</p>
<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>vars.<span style="color: #660066;">color</span> <span style="color: #339933;">!=</span> undefined<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; color <span style="color: #339933;">=</span> vars.<span style="color: #660066;">color</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; color <span style="color: #339933;">=</span> ‘#0f0’<span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>So we are saying if vars.color isn’t undefined, color equals vars.color or else color equals green. We do this so that if we don’t set a color then the plug-in will default to green. And we’re doing the same with width, if we don’t set it, then the default with is 400 pixels. We could also set this to null and then run an if statement later, but this is simpler. Next is the actual meat of the plug-in:</p>
<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">element.<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><br />
&nbsp; element.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #3366CC;">'background-color'</span> <span style="color: #339933;">:</span> color<span style="color: #339933;">,</span><br />
&nbsp; &nbsp; <span style="color: #3366CC;">'width'</span> <span style="color: #339933;">:</span> width <span style="color: #339933;">+</span> <span style="color: #3366CC;">'px'</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Here we’re saying when element is clicked then change the CSS properties for element. Now we have to set up how we call the plug-in in our HTML file:</p>
<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$<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><br />
&nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#blue'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">our_plugin</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; width<span style="color: #339933;">:</span> <span style="color: #CC0000;">100</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#red'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">our_plugin</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; color<span style="color: #339933;">:</span> <span style="color: #3366CC;">'yellow'</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>We’re calling our plug-in for both the #blue and #red divs and we are setting the width for the #blue div to 100 pixels and the background color of the #red div is being changed to yellow. So now when the #blue div is clicked it changes to a width of 100 pixels and changes to a green background whereas the #red div will become 400 pixels wide and get a yellow background.</p>
<p>And that’s all there is to setting up a jQuery plug-in that has custom values. Building your plug-ins this way makes them even more useful and enables you to use them over and over without having to edit the actual JavaScript file.</p>
]]></content:encoded>
			<wfw:commentRss>http://atomicrobotdesign.com/blog/web-development/make-customizable-jquery-plug-ins-and-be-more-awesome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Every front-end developer needs to know JavaScript now</title>
		<link>http://atomicrobotdesign.com/blog/htmlcss/every-front-end-developer-needs-to-know-javascript-now/</link>
		<comments>http://atomicrobotdesign.com/blog/htmlcss/every-front-end-developer-needs-to-know-javascript-now/#comments</comments>
		<pubDate>Wed, 06 Oct 2010 05:03:16 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[javascr]]></category>

		<guid isPermaLink="false">http://atomicrobotdesign.com/blog/?p=689</guid>
		<description><![CDATA[When I was in school all I took away from the JavaScript class was how to make pop-ups, find the date and swap out images. JavaScript had a bad rap and the teachers attitude towards it was that you needed &#8230; <a href="http://atomicrobotdesign.com/blog/htmlcss/every-front-end-developer-needs-to-know-javascript-now/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When I was in school all I took away from the JavaScript class was how to make pop-ups, find the date and swap out images. JavaScript had a bad rap and the teachers attitude towards it was that you needed to know a bit, but it wasn’t a big deal. If you wanted to be web  designer/developer, then the basic knowledge you needed was HTML and CSS. But now clients are seeing what you can do and I think that JavaScript, or at least basic understanding of a library like <a href="http://jquery.com/">jQuery</a> needs to be a part of any web designer’s skill set.</p>
<p>Clients are starting to see a lot of JavaScript functionality on other sites and are expecting every web designer and front-end developer to be able to recreate that for them. It’s going to get harder and harder to get by with just HTML and CSS knowledge. Even Flash or Silverlight might not cut it as some of the Flash bashing has begun to reach clients ears. I’m a guy that enjoys working with Flash and I’ve talked clients out of using Flash for something that can just as easily be made with a jQuery plug-in.</p>
<p>And that’s the beauty of JavaScript becoming part of the basic building blocks of a website, almost anything you need has been already built and 99% of the time it’s there for you to use. Even if you don’t understand how to program in JavaScript, a bit of effort will enable you to use jQuery plug-ins and a little bit more will help you learn to write your own. And if you’re anything like me, all the jQuery work will lead you into writing things with pure JavaScript.</p>
<p>Really, this is all just falling under the “HTML5” branding that companies like Apple are throwing around. If you’ve ever checked out their <a href="http://www.apple.com/html5/">HTML5 showcase</a>, there’s only two actual HTML5 demos, the rest are all CSS and JavaScript. But the trend now is, HTML for structure, CSS for style and positioning, and JavaScript for functionality. You won’t need JavaScript for every site but it will make life a lot easier.</p>
]]></content:encoded>
			<wfw:commentRss>http://atomicrobotdesign.com/blog/htmlcss/every-front-end-developer-needs-to-know-javascript-now/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Glowing nav effect using jQuery</title>
		<link>http://atomicrobotdesign.com/blog/htmlcss/glowing-nav-effect-using-jquery/</link>
		<comments>http://atomicrobotdesign.com/blog/htmlcss/glowing-nav-effect-using-jquery/#comments</comments>
		<pubDate>Fri, 10 Sep 2010 01:00:05 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://atomicrobotdesign.com/blog/?p=648</guid>
		<description><![CDATA[I’m a big fan of the design of Fullyillustrated.com and one of the things that caught my eye is the glow effect on the navigation. Setting up something like this is actually a lot easier than you’d first think as &#8230; <a href="http://atomicrobotdesign.com/blog/htmlcss/glowing-nav-effect-using-jquery/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I’m a big fan of the design of <a href="http://www.fullyillustrated.com/">Fullyillustrated.com</a> and one of the things that caught my eye is the glow effect on the navigation. Setting up something like this is actually a lot easier than you’d first think as long as you know basic jQuery. I’m not sure exactly how it’s done on the site but I’ve figured out how I’d do it based on <a href="http://net.tutsplus.com/tutorials/html-css-techniques/how-to-build-a-lava-lamp-style-navigation-menu/">code by Jeffrey Way over at Nettuts+</a>. I’m not going to go over this step by step, if you want to get a better understanding of the jQuery, watch Jeffrey’s video.</p>
<p>Here’s a <a href="http://atomicrobotdesign.com/blog_media/green_nav.html">demo</a> of the effect.</p>
<p>Our HTML:</p>
<div class="codecolorer-container html4strict twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;container&quot;</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/ul.html"><span style="color: #000000; font-weight: bold;">ul</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;nav&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">li</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;selected&quot;</span>&gt;&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Home<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">li</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">li</span></a>&gt;&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>About<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">li</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">li</span></a>&gt;&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Blog<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">li</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">li</span></a>&gt;&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Portfolio<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">li</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">li</span></a>&gt;&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Contact<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">li</span></a>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/ul.html"><span style="color: #000000; font-weight: bold;">ul</span></a>&gt;</span><br />
&nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span><br />
&nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span><br />
&nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span><br />
&nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;jquery.glowNav.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span><br />
&nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span><br />
&nbsp; $('#nav').glowNav({<br />
&nbsp; &nbsp; <br />
&nbsp; });<br />
&nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span></div></td></tr></tbody></table></div>
<p>All we have here is a basic website nav, links to jQuery, jQuery UI and our jQuery code.</p>
<p>The CSS:</p>
<div class="codecolorer-container css twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #00AA00;">*</span> <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <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><br />
&nbsp; &nbsp; <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><br />
<span style="color: #00AA00;">&#125;</span><br />
<span style="color: #cc00cc;">#container</span> <span style="color: #00AA00;">&#123;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">680px</span><span style="color: #00AA00;">;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">100px</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span><br />
<span style="color: #cc00cc;">#glow</span> <span style="color: #00AA00;">&#123;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">green_glow.png</span><span style="color: #00AA00;">&#41;</span> <span style="color: #000000; font-weight: bold;">bottom</span> <span style="color: #993333;">center</span> <span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">;</span><br />
&nbsp; <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><br />
&nbsp; <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span><br />
<span style="color: #cc00cc;">#nav</span> <span style="color: #00AA00;">&#123;</span><br />
&nbsp; <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><br />
&nbsp; <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span><br />
&nbsp; <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><br />
<span style="color: #00AA00;">&#125;</span><br />
<span style="color: #cc00cc;">#nav</span> li <span style="color: #00AA00;">&#123;</span><br />
&nbsp; <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><br />
&nbsp; <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><br />
<span style="color: #00AA00;">&#125;</span><br />
<span style="color: #cc00cc;">#nav</span> li a <span style="color: #00AA00;">&#123;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#ccc</span><span style="color: #00AA00;">;</span><br />
&nbsp; <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><br />
&nbsp; <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">2</span><span style="color: #00AA00;">;</span><br />
&nbsp; <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><br />
&nbsp; <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">16px</span><span style="color: #00AA00;">;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #3333ff;">:helvetica</span><span style="color: #00AA00;">,</span> arial<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">20px</span> <span style="color: #933;">45px</span> <span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span><br />
<span style="color: #cc00cc;">#nav</span> li a<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span> &nbsp;<br />
<span style="color: #00AA00;">&#125;</span><br />
li<span style="color: #cc00cc;">#selected</span> a <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
<p>Here we’re setting the green_glow.png as the background to #glow. #glow also has a z-index of 1 and the links have a z-index of 2 to make sure that they appear on the top. Other than that, the CSS is just basic styling.</p>
<p>The JavaScript:</p>
<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><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><br />
&nbsp; $.<span style="color: #660066;">fn</span>.<span style="color: #660066;">glowNav</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>options<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; options <span style="color: #339933;">=</span> $.<span style="color: #660066;">extend</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; overlap<span style="color: #339933;">:</span> <span style="color: #CC0000;">20</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; speed<span style="color: #339933;">:</span> <span style="color: #CC0000;">500</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; reset<span style="color: #339933;">:</span> <span style="color: #CC0000;">100</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; color<span style="color: #339933;">:</span> <span style="color: #3366CC;">'#000'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; easing<span style="color: #339933;">:</span> <span style="color: #3366CC;">'easeOutExpo'</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> options<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">each</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><br />
&nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> nav <span style="color: #339933;">=</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: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; currentPageItem <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#selected'</span><span style="color: #339933;">,</span> nav<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; glow<span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; reset<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;li id=&quot;glow&quot;&gt;&lt;/li&gt;'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; width<span style="color: #339933;">:</span> currentPageItem.<span style="color: #660066;">outerWidth</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; height<span style="color: #339933;">:</span> currentPageItem.<span style="color: #660066;">outerHeight</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; left<span style="color: #339933;">:</span> currentPageItem.<span style="color: #660066;">position</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">left</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; top<span style="color: #339933;">:</span> currentPageItem.<span style="color: #660066;">position</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">top</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; backgroundColor<span style="color: #339933;">:</span> options.<span style="color: #660066;">color</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">appendTo</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#nav'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; glow <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#glow'</span><span style="color: #339933;">,</span> nav<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'li'</span><span style="color: #339933;">,</span> nav<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><br />
&nbsp; &nbsp; &nbsp; &nbsp; clearTimeout<span style="color: #009900;">&#40;</span>reset<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; glow.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; left<span style="color: #339933;">:</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;">position</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">left</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; width<span style="color: #339933;">:</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;">width</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; duration<span style="color: #339933;">:</span> options.<span style="color: #660066;">speed</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; easing<span style="color: #339933;">:</span> options.<span style="color: #660066;">easing</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; queue<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <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><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">//mouse out</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; glow.<span style="color: #000066;">stop</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; left<span style="color: #339933;">:</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;">position</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">left</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; width<span style="color: #339933;">:</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;">width</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> options.<span style="color: #660066;">speed</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; reset <span style="color: #339933;">=</span> setTimeout<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><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; glow.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; width<span style="color: #339933;">:</span> currentPageItem.<span style="color: #660066;">outerWidth</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; left<span style="color: #339933;">:</span> currentPageItem.<span style="color: #660066;">position</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">left</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> options.<span style="color: #660066;">speed</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> options.<span style="color: #660066;">reset</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>jQuery<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>The main differences between this and Jeff’s original code is that we aren’t creating the background with the slider using CSS, we’re using an image. And the slider isn’t bigger than the regular &lt;li&gt; tags.</p>
<p>And <a href="http://atomicrobotdesign.com/blog_media/green_nav.html">here&#8217;s what we get</a>.</p>
<p>This is a great effect that can be different every time and it’s pretty straight forward. And a nice bonus is that you can reuse the jQuery code every time because the main effects and styles are all set with CSS.</p>
]]></content:encoded>
			<wfw:commentRss>http://atomicrobotdesign.com/blog/htmlcss/glowing-nav-effect-using-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

