distillery 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,158 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
+ <html lang="en">
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
5
+ <link rel="home" title="Knolif's Front page" href="www.knolif.com">
6
+ <link rel="SHORTCUT ICON" href="/images/favicon.ico">
7
+ <link rel="stylesheet" href="/blogstyle.css" type="text/css" title="BlogStyle">
8
+ <link rel="alternate" type="application/rss+xml" href="http://www.blog.knolif.com/rss.php" title="Serge's Blog RSS Feed">
9
+ <meta name="google-site-verification" content="-MHjTZ8KWU1BU2ObPcIuEWNihjtUvw6X3NPGCokDzMo">
10
+ <meta name="description" content="This is a blog that was made to document a starting out independent game developers experiences while learning to create video games in Java. While this blog is focused on this journey it is also punctuated by specific and general comments on any and all things relating to video games.">
11
+ <meta name="keywords" content="Knolif, Java, coding, programming, game, development, Serge-David, Blog, sprites, textures, frames, artist, drawing">
12
+ <title>Serge's Game Blog - Image Overload</title>
13
+ </head>
14
+ <body>
15
+ <!-- start of cmfads.com tracking code -->
16
+ <script type="text/javascript">
17
+ (function(){
18
+ var cmf = document.createElement('script');
19
+ cmf.type = 'text/javascript';
20
+ cmf.async = true;
21
+ cmf.src = 'http://www.cmfads.com/widget/base.js';
22
+ (document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(cmf);
23
+ })();
24
+ </script>
25
+ <!-- end of cmfads.com tracking code -->
26
+ <div class="Blog">
27
+
28
+ <div class="Header">
29
+ <h1 style="float:left;">Serge's Blog</h1>
30
+ <div style="float:right;margin-top:0.9em;margin-right:0.52em">
31
+ <!-- Begin: adBrite, Generated: 2011-03-13 3:11:26 -->
32
+ <script type="text/javascript">
33
+ var AdBrite_Title_Color = '66B5FF';
34
+ var AdBrite_Text_Color = 'E6E6E6';
35
+ var AdBrite_Background_Color = '32527A';
36
+ var AdBrite_Border_Color = '000000';
37
+ var AdBrite_URL_Color = '80FF00';
38
+ try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.referrer==''?document.location:document.referrer;AdBrite_Referrer=encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe='';var AdBrite_Referrer='';}
39
+ </script>
40
+ <span style="white-space:nowrap;"><script type="text/javascript">document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(' src="http://ads.adbrite.com/mb/text_group.php?sid=1888389&zs=3436385f3630&ifr='+AdBrite_Iframe+'&ref='+AdBrite_Referrer+'" type="text/javascript">');document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62));</script>
41
+ <a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=1888389&amp;afsid=1"><img src="http://files.adbrite.com/mb/images/adbrite-your-ad-here-banner-w.gif" style="background-color:#000000;border:none;padding:0;margin:0;" alt="Your Ad Here" width="11" height="60" border="0"></a></span>
42
+ <!-- End: adBrite -->
43
+ </div>
44
+
45
+ <div class="TopDiv">
46
+ <a class="TopButtons" href="http://www.blog.knolif.com/">Home</a>
47
+ <a class="TopButtons" href="http://www.blog.knolif.com/tuts/">Tutorials</a>
48
+ <a class="TopButtons" href="http://www.blog.knolif.com/about/">About</a>
49
+ <a class="TopButtons" href="http://www.blog.knolif.com/privacy/">Privacy</a>
50
+ <a class="TopButtons" href="http://www.blog.knolif.com/sitemap/">Site Map</a>
51
+ <a class="TopButtons" type="application/rss+xml" href="http://www.blog.knolif.com/rss.php">RSS Feed</a>
52
+ </div>
53
+ </div>
54
+
55
+ <div class="Right">
56
+ <h2>Recent Posts</h2>
57
+ <ul>
58
+ <li><a href="/Image-Overload/">Image Overload</a></li><li><a href="/Indie-Reviews-01/">Indie Reviews 01</a></li><li><a href="/All-About-Sprites/">All About Sprites</a></li>
59
+ </ul>
60
+ <h2>Catagories</h2>
61
+ <ul>
62
+ <li><a href="/all/">All Categories</a></li>
63
+ <li><a href="/blog/">Blog Information</a></li>
64
+ <li><a href="/java/">Java Project</a></li>
65
+ <li><a href="/game/">Game Comment</a></li>
66
+ </ul>
67
+ <h2>Top Posts</h2>
68
+ <ul style="margin-bottom:1.25em;">
69
+ <li><a href="/Game-Theories/">Game Theories</a></li><li><a href="/Creeper-World-Review/">Creeper World Review</a></li><li><a href="/Development-Begins/">Development Begins</a></li>
70
+ </ul><div id="cmfclassic_2976_2_0" class="cmfadslot cmfclassic" style="width: 250px; height: 125px; background: inherit !important; color: #fff; !important; padding: 0 !important; background-image: none !important;margin-bottom:0.4em !important;"></div>
71
+
72
+ <script src="http://entrecard.s3.amazonaws.com/widget.js?user_id=76399&amp;type=standard_250" type="text/javascript" id="ecard_widget"></script>
73
+
74
+ <div style="float: right;margin: 0.4em 3em 0.5em 0px;">
75
+ <!-- Project Wonderful ad code -->
76
+ <script type="text/javascript">
77
+ var pw_d=document;
78
+ pw_d.projectwonderful_adbox_id = "54905";
79
+ pw_d.projectwonderful_adbox_type = "3";
80
+ </script>
81
+ <script type="text/javascript" src="http://www.projectwonderful.com/ad_display.js"></script>
82
+ <noscript><map name="admap54905" id="admap54905"><area href="http://www.projectwonderful.com/out_nojs.php?r=0&amp;c=0&amp;id=54905&amp;type=3" shape="rect" coords="0,0,160,600" title="" alt="" target="_blank"></map>
83
+ <table cellpadding="0" border="0" cellspacing="0" width="160" bgcolor="#ffffff"><tr><td><img src="http://www.projectwonderful.com/nojs.php?id=54905&amp;type=3" width="160" height="600" usemap="#admap54905" border="0" alt=""></td></tr><tr><td bgcolor="#ffffff" colspan="1"><center><a style="font-size:10px;color:#0000ff;text-decoration:none;line-height:1.2;font-weight:bold;font-family:Tahoma, verdana,arial,helvetica,sans-serif;text-transform: none;letter-spacing:normal;text-shadow:none;white-space:normal;word-spacing:normal;" href="http://www.projectwonderful.com/advertisehere.php?id=54905&amp;type=3" target="_blank">Ads by Project Wonderful! Your ad here, right now: $0</a></center></td></tr></table>
84
+ </noscript>
85
+ <!-- End of Project Wonderful ad code -->
86
+ </div>
87
+
88
+ </div>
89
+
90
+ <div class="Body">
91
+ <div class="FullTop"><strong>Image Overload</strong></div>
92
+ <div class="FullPost">
93
+ <div style="float:left;text-align:center;">
94
+ <img src="/images/javapic.png" alt="Java Entry">
95
+ <script type="text/javascript">
96
+ digg_url = "http://www.blog.knolif.com";
97
+ digg_title = "Serge's Blog";
98
+ </script>
99
+ <script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
100
+ </div>
101
+ Posted on 2011-04-23 16:23:15
102
+ <p>Currently in my Plants vs Zombies clone I have been steadily adding characters and working on graphical improvements. Currently before I get too far into the game I've decided with some advice to re-theme the game. I might even have an artist who will join in the creation of this game. With the potential inclusion of another person into the project I've been working on setting up very basic layout of more characters with the theme in mind to add a lot of choices in creation. I've been thinking on how much art work needs to be done for my project, and the scale is daunting.</p>
103
+
104
+ <p>In this game I want several things to be included. I'm going to list it in a list because that is what a list is fore. If you don't list things in a list then the list will look silly as it will just run on and on. The running on I am talking about is very much like this paragraph, but that is just for added effect. By the way did I mention the new theme is pirates fighting aliens?</p>
105
+
106
+ <ul>
107
+ <li>Background Image (What everything is drawn upon) which includes the water / sand / boat / bushes</li>
108
+ <li>Background Effects (Moving parts of the background) which includes the water near the edges and some grass</li>
109
+ <li>Menu items (The information block, plant picker, and buttons) which the buttons will have to have two states (clicked and unclicked)</li>
110
+ <li><s>Plants</s> Pirates (The characters themselves with their multiple animations)</li>
111
+ <li><s>Seeds</s> Bullets/cannonballs/barrels/rum (Anything the pirates use to attack)</li>
112
+ <li><s>Zombies</s> Aliens (The baddie stuff that tries to steal your booty, oh no!)</li>
113
+ <li>Effects (muzzle flair, smoke, explosions, spilled rum *sniff*)</li>
114
+ <li>Foreground (Anything above the playing field) like birds and clouds as extra effect</li>
115
+ <li>You Win (The cool image that displays whenever you might win The Game)</li>
116
+ <li>You Lose (The cool image that displays whenever you might lose) probably a sad pirate next to an empty chest</li>
117
+ <li>A Logo (Something I can plop up at the start of the game and include in the download page / advertising)</li>
118
+ </ul>
119
+
120
+ <p>To give you an idea of how big this is, I'm having each animated item like the waves and grass to have about four frames. A default, two building up, and a return frame. It gives a fairly good result to have four frames to work with, as I can have movement every 1/4th frame, every other, or every one is different. The pirates and aliens are a bit different but still employ the four frame method. There is the default frame, three idle frames, and three attacking frames. The character will loop through the idle frames while they aren't attacking, and when they attack they loop through the other. There might be a need to include another set of frames for the aliens for a standing still animation so they don't look like they are walking in place, but that can be added at a later date.</p>
121
+
122
+ <p>Not only do I want to have seven frames per character, but I also want them to show how close to dying they are. When they have over half their health they will look normal, when it dips below 50% they start to show signs of wearing down. When it finally drops below 25% the wear and tear will definitely be showing. This means that there will have to be 21 separate images per character (on the same sheet). So say we have six pirates and four aliens, that is 210 sprites. This included with the four waves, and about three plants is now up to 226. Finally adding everything else but the effects we reach around 240.</p>
123
+
124
+ <img src="/pictures/NewThemesBackground.png" alt="A picture of the new theme.">
125
+
126
+ <p>Finally for the effects. I'll be continuing the four frame thing here as well, thought it might get boosted to six for a greater range of effects joy (depending on how big we end up making them). If there is about five effects, that brings the total up to 260 separate images! Now a lot of these (pirates and aliens) can be mostly copied, pasted, then tweaked. However still that is a tall order, especially since I want more then six pirates and aliens.</p>
127
+
128
+ <p>This is a general idea of how big a project just a simple "for fun" thing I end up doing. A 3D game would not be very much worse as there are several textures per character and object, you can reuse those textures on more than just one character or object though. Surprisingly enough, 300 or so images is not that large, as some of the bigger games (Unreal Tournament 2004 for example) can have a few thousand textures / images. Don't be discouraged though as making your game look better should be fun instead of tedious. I mostly add or change the different pictures / sheets when I feel like it so it is less of a chore, as you can imaging everything gets a ton of revisions until it makes the final cut.</p>
129
+
130
+ <p>I hope this insight doesn't discourage anyone, you might try making a less graphical game (machines don't have to move to look right). I really suggest partnering up with a graphic artist though, it sure does get annoying when you want to program in animations / new characters but you have to make a picture for them before you can really get a feel for their precise attributes (health, speed, damage).</p>
131
+
132
+ <p>Finally I have released an alpha test of the game (uploaded it yesterday before theme change was planned). You can download it from <a href="http://www.blog.knolif.com/Lawn-Vs-Aliens-Download/">its download page</a>. Also I'd love some feedback, you can never get enough feedback.</p>
133
+ </div>
134
+ <div class="FullBottom"> [<a href="/Lawn-Vs-Aliens-Download/">Previous Post</a>] <a href="/vote/Image-Overload/1"><img src="/images/star0.png" alt="" title="I disliked it"></a><a href="/vote/Image-Overload/2"><img src="/images/star0.png" alt="" title="It was bleh"></a><a href="/vote/Image-Overload/3"><img src="/images/star0.png" alt="" title="It was okay"></a><a href="/vote/Image-Overload/4"><img src="/images/star0.png" alt="" title="I liked it"></a><a href="/vote/Image-Overload/5"><img src="/images/star0.png" alt="" title="I loved it"></a> [Next Post]</div>
135
+ <form action="" method="POST">
136
+ <div class="Submit">
137
+ Your Name (optional) <input name="name" type="text" title="Leave blank to be Anonymous."><br>
138
+ Website (optional) <input name="mail" type="text" title="Where are you from? Will be shown to the public."><br>
139
+ <textarea name="text" cols="50" rows="6"></textarea><br>
140
+ <input type="submit" value="Submit Comment">
141
+ <input name="blog" type="hidden" value="46">
142
+ </div>
143
+ </form>
144
+
145
+ <div class="More"><a href="/Image-Overload/all">View all comments</a></div>
146
+
147
+ </div>
148
+ <div class="Footer">
149
+
150
+ <a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01 Transitional" height="31" width="88"></a>
151
+ <a href="mailto:blog.knolif.com">Drop me a line</a>
152
+ <a href="http://jigsaw.w3.org/css-validator/check/referer">
153
+ <img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss"alt="Valid CSS!">
154
+ </a>
155
+ </div>
156
+ </div>
157
+ </body>
158
+ </html>
@@ -0,0 +1,181 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--DVID=00034197--><html lang="en"><head><meta charset="ISO-8859-1">
2
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
3
+ <meta name="ROBOTS" content="NOODP">
4
+ <meta name="pd" content="Monday, 31-Jan-2011 16:34:14 GMT">
5
+ <link rel="shortcut icon" href="http://0.tqn.com/f/a08.ico">
6
+ <link rel="apple-touch-icon" href="http://0.tqn.com/f/lg/i129.png">
7
+ <link rel="search" type="application/opensearchdescription+xml" href="http://0.tqn.com/4/o/os.xml" title="About.com">
8
+ <script>var ziRfw=0;zobt=" Southern Food Ads";zOBT=" Ads";function zIpSS(u){zpu(0,u,280,375,"ssWin")}function zIlb(l,t,f){zT(l,'18/1Pp/wX')}</script>
9
+ <link rel="stylesheet" href="http://0.tqn.com/0g/dc/s55.css" media="all"><!--[if lt IE 9]><link rel="stylesheet" href="http://0.tqn.com/8g/dc/ie.css" type="text/css" media="all"><![endif]--><!--[if lt IE 8]><link rel="stylesheet" href="http://0.tqn.com/8g/dc/rdie.css" type="text/css" media="all"><![endif]-->
10
+ <meta http-equiv="pics-Label" content='(pics-1.1 "http://www.icra.org/pics/vocabularyv03/" l gen true for "http://southernfood.about.com" r (n 0 s 0 v 0 l 0 oa 0 ob 0 oc 0 od 0 oe 0 of 0 og 0 oh 0 c 0) gen true for "http://southernfood.about.com" r (n 0 s 0 v 0 l 0 oa 0 ob 0 oc 0 od 0 oe 0 of 0 og 0 oh 0 c 0))'>
11
+ <meta property="og:title" content=" Ginger&#160;Cookies"><meta property="og:type" content="article"><meta property="og:image" content="http://0.tqn.com/f/lg/i129.png"><meta property="og:url" content="http://southernfood.about.com/od/spicecookies/r/bl30512k.htm"><meta property="og:site_name" content="About.com Southern Food"><meta property="og:description" content="Southern Food and recipes, including classic southern favorites, crockpot recipes, delicious desserts, breakfast recipes, main dish and side dish casserole recipes, family recipe favorites, and more."><meta property="fb:app_id" content="121030274606741">
12
+ <script>zWASL=1;zGRH=1</script>
13
+ <style>#tt39 #articlebody .gB a.t,#tt39 #articlebody .gB a.t:hover,#tt39 #articlebody .gB a.u,#tt39 #articlebody .gB a.u:hover,#widgets .gB a.t,#widgets .gB a.t:hover,#abc .gB a.t, #abc .gB a.t:hover,#abm .gB a.t, #abm .gB a.t:hover,#abc .gB a.u,#abc .gB a.u:hover,#abm .gB a.u,#abm .gB a.u:hover,#widgets .gB a.u,#widgets .gB a.u:hover{text-decoration:underline}</style><style>#rs{margin:0 0 10px}#rs #n5{font-weight:bold}#rs a{padding:7px;text-transform:capitalize}</style>
14
+
15
+ <style>#tt33.igt #abt .ssnav, #tt33.igt #sspre .ssnav {padding: 0;}#tt33.igt #abt .ssnav .pagination, #tt33.igt #sspre .ssnav .pagination {padding: 0;width: 70px;margin: 0 auto;}#tt26 #abt h1#pk {font: 18px Arial;}</style>
16
+ <style>#abi #lftr,#abi #zIhf,#abi #zIHC{margin-bottom:0;}#abi #lftr{float:left;width:630px;}#abi #zIhf{color:#999;float:right;position:static;text-align:right;width:350px;}#zIhf img{margin-left:5px;}#di{float: right;}#tt1 #abc .meta {margin-right: 0;}#coda .sm{left:auto;right:0;width:auto;}</style>
17
+ <title>Ginger Cookies Recipe - Ginger Cookies with Spices and Molasses</title><meta name="keywords" content="ginger cookies recipe allspice cloves sugar bacon drippings lard vanilla"><meta name="description" content="Ginger cookies recipe with ginger, molsasses, cinnamon, and ground cloves. Ginger cookies are chilled, shaped into balls, then baked."></head>
18
+
19
+ <body id="tt28" class="gt2">
20
+
21
+ <script language="JavaScript">
22
+ <!--
23
+ zGOW=0;xd=0;zap="";zAth='2';zAthG='2';zTt='28';zir='';zBTS=1;zBT=0;zSt='';zGz='g'
24
+ ch='food';gs='southernfood';xg="Southern Food";zcs=''
25
+ zFDT='2'
26
+ zFST='0'
27
+ zOr='B4P4V10aOkWA1G7q';zTbO=zRQO=1;zp0=zp1=zp2=zp3=zfs=0;zDc=1;
28
+ zSm=zSu=zhc=zpb=zgs=zdn='';zFS='B4P20B40210B00201';zFD='B4P2B4OJB4L1B451B3N10B40N4B30540B00S08'
29
+ zDO=zis=1;zpid=zi=zRf=ztp=zpo=0;zdx=20;zfx=100;zJs=13;
30
+ zi=1;zz=';336280=2-1-1299;72890=2-1-1299;336155=2-1-1208;93048=2-1-12-1;30050=2-1-1299';zx='3-1-1399';zde=15;zdp=1440;zds=1440;zfp=0;zfs=66;zfd=100;zdd=20;zaX=new Array(11, new Array(100,830,8192,4,'336,176'),7, new Array(100,284,8196,9,'336,290'));zDc=1;;zD336=1;;zhc='';;zGTH=1;
31
+ zGo=0;zG=1;zTac=2;zDot=0;
32
+ zObT="Cooking";zRad=5;var tp=" primedia_"+(zBT?"":"non_")+"site_targeting";if(!this.zGCID)zGCID=tp
33
+ else zGCID+=tp;
34
+ if(zBT>0){zOBR=1}
35
+ //-->
36
+ </script>
37
+ <script language="JavaScript" src="http://0.tqn.com/0g/js/cj017x14t421p9.js?rdv=j23"></script>
38
+ <script>function zob(p){if(!this.zOfs)return;var a=zOfs,t,i=0,l=a.length;if(l){w('<div id="oF"><b>'+(this.zobt?zobt:xg+' Ads')+'</b><ul>');while((i<l)&&i<zRad){t=a[i++].line1;w('<li><a href="/z/js/o'+(p?p:'')+'.htm?k='+zUriS(t.toLowerCase())+(this.zobr?zobr:'')+'&d='+zUriS(t)+'&r='+zUriS(zWl)+'" target="_'+(this.zOBNW?'new'+zr(9999):'top')+'">'+t+'</a></li>');}w('</ul></div>')}}function rb600(){if(gEI('bb'))gEI('bb').height=600}</script><script>zDO=0</script>
39
+ <script language="JavaScript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script><noscript><meta http-equiv=refresh content="0;url=http://www.about.com/snf.htm?u=http://southernfood.about.com/od/spicecookies/r/bl30512k.htm%3Frd%3D1"></noscript>
40
+
41
+ <script>z930=zpreC(930,48);if(thin){z930=0};z160=zpreC(160,600);z336=zpreC(336,280);z728=zpreC(728,90);z155=zpreC(336,155);zItw=160</script>
42
+ <div id="abw" class="hrecipe">
43
+ <div id="abh">
44
+ <ol class="ct"><li class="h"><a href="http://www.about.com/" zT="18/1Yd/Zz">Home</a></li><li><a href="http://www.about.com/food/" zT="18/1Yd/Zz">Food & Drink</a></li><li><a href="/" zT="18/1Yd/Zz">Southern Food</a></li></ol>
45
+ <div id="adL"><script>if(z930==0 && z728>0){adunit('','',uy,ch,gs,728,90,'1','lb',1)}</script></div>
46
+ <div class="ma"><div class="lg"><a href="http://www.about.com/" zT="18/1Yb/Zv"><img src="http://0.tqn.com/f/lg/a148.png" alt="About.com"></a></div><h2><a href="/" zT="18/1Yc/Zx" title="Southern Food">Southern Food</a></h2></div>
47
+ <form class="gs" method="get" action="http://southernfood.about.com/sitesearch.htm" target="_top"><fieldset><input id="sv" name="q" value="" validate="required" alert="Please enter something to search for!"><input type="hidden" name="SUName" value="southernfood"><button class="btn" type="submit">Search</button></fieldset></form>
48
+ <ul id="up"><li class="h"><a href="http://southernfood.about.com/" zT="18/1ZZ/aZ"><span>Southern Food</span></a></li><li><a href="http://southernfood.about.com/od/recipesbycourse/u/easyrecipes.htm" zT="18/1ZZ/11o">Easy Recipes</a></li><li><a href="http://southernfood.about.com/od/recipesbycourse/u/favorites.htm" zT="18/1ZZ/11q">Classic Dishes</a></li><li><a href="http://southernfood.about.com/od/seasonalrecipes/u/Holiday-And-Seasonal-Recipes.htm" zT="18/1ZZ/11r">Holiday/Seasonal</a></li><script>if(typeof zp != 'undefined'){if(zp[8].d){if(zp[8].d==974 && zp[8].u==3){zp[8].u=8;zp[8].w=121;zp[8].h=23}if(zp[8].d==974 && zp[8].u==7){zp[8].u=9;zp[8].w=196;zp[8].h=23}if(zp[8].d==1005){zp[8].u=2;zp[8].w=149;zp[8].h=23}if(zp[8].d==1027){zp[8].u=2;zp[8].w=156;zp[8].h=23}w('<li id="st">');Dsp(zp[8],'ip');w('</li>')}}</script></ul>
49
+ <ul id="pa"><li id="ea"><a href="/gi/pages/shareurl.htm?PG=http%3a%2f%2fsouthernfood%2eabout%2ecom%2fod%2fspicecookies%2fr%2fbl30512k%2ehtm&zItl=Ginger%20Cookies" zT="18/1Z0/[3">Share</a></li><li id="pra"><script>w(x2+zWl+'?p=1" zT="18/1[N" rel="nofollow">Print</a>')</script></li></ul>
50
+ </div>
51
+ <script type="text/javascript">if(z930>0){adunit('','',uy,ch,gs,930,48,'1','s',1)}</script><div id="com"><form class="nl" name="subscription" action="http://clk.about.com/" method="get" alert="Please enter a valid email address."><label for="nTxt">Free Southern Food Newsletter!</label><input type="hidden" name="zi" value="18/1a9"><input type="hidden" name="surl" value="http://southernfood.about.com/gi/pages/mmail.htm"><input type="hidden" name="eurl" value="http://southernfood.about.com/gi/pages/mmail.htm"><input type="hidden" name="cmd_southernfood" value="+:gs::southernfood"><input type="hidden" name="gs" value="1"><input type="hidden" name="sdn" value="southernfood"><input type="hidden" name="tt" value="28"><input type="hidden" name="bts" value="1"><span><input id="nTxt" type="email" name="email" placeholder="Enter email address" validate="email"></span><button type="submit" name="newsub">Sign Up</button></form><p><a href="http://forums.about.com/n/pfx/forum.aspx?nav=messages&webtag=ab-southernfood" zT="18/1Z1"><b>Discuss</b> in the forum</a></p></div>
52
+ <!--gc--><div id="abt"><h1 class="item"><span class="fn"> Ginger&#160;Cookies</span></h1><div id="urate" class="ur review hreview-aggregate"><span class="rating"><span>User Rating</span> <span class="average"><span class="value-title four" title="4"> <span>4 Star Rating</span></span></span> (<a href="http://southernfood.about.com/u/r/od/spicecookies/r/bl30512k.htm"><span class="count">1</span> Review</a>) <b class="next"><a href="http://reviews.about.com/6843-2/3b933jW005mS/submission.htm?bvpage=action.htm&amp;action=AddReview&amp;format=embedded&amp;user=__USERID__&amp;return=http://southernfood.about.com/od/spicecookies/r/bl30512k.htm&amp;loginparams=__BVLOGINPARAMETERS__&amp;submissionparams=sdn%3Dsouthernfood&amp;campaignid=BV_RATING_SUMMARY_ZERO_REVIEWS&amp;submissionurl=__BVSUBMISSIONURL__">Write a review</a></b></span></div><p id="by">By <span class="author"><a href="/bio/Diana-Rattray-2.htm" rel="author">Diana Rattray</a>, About.com Guide</span></p></div>
53
+ <div class="tr"><h4>See More About:</h4><ul><li><a href="/lr/ginger/784124/1/" zT="18/1Ys/[1" rel="nofollow">ginger</a></li><li><a href="/lr/spice_cookes/784124/2/" zT="18/1Ys/[1" rel="nofollow">spice cookes</a></li><li><a href="/lr/molasses_cookies/784124/3/" zT="18/1Ys/[1" rel="nofollow">molasses cookies</a></li></ul></div>
54
+ <div id="abm" class="clear"><div id="abc">
55
+
56
+
57
+
58
+
59
+
60
+
61
+
62
+ <div id="sb1" class="sb"><script type="text/javascript">zSB(3,3)</script><script type="text/javascript">zob();if(zs<1){gEI('sp1').className=gEI('sb1').className='hide';}</script></div>
63
+ <div id="articlebody">
64
+ <div id="intro" class="summary">Ginger cookies are chilled, shaped into balls, then baked.</div><h3>Cook Time: <span>12 minutes</span></h3><h3>Total Time: <span class="duration">12 minutes<span class="value-title" title="PT12M"></span></span></h3><h3 id="rI">Ingredients:</h3><ul><li class="ingredient">3/4 cup shortening </li><li class="ingredient">3/4 cup sugar</li><li class="ingredient">1/2 cup molasses </li><li class="ingredient">1 egg</li><li class="ingredient">2 1/4 cups all-purpose flour</li><li class="ingredient">1 1/2 teaspoons baking soda </li><li class="ingredient">1 teaspoon ground cinnamon</li><li class="ingredient">1/2 teaspoon ground ginger</li><li class="ingredient">1/8 teaspoon ground cloves</li><li class="ingredient">1/4 teaspoon salt </li><li class="ingredient">sugar </li></ul><h3 id="rP">Preparation:</h3><div class="instructions">In a large mixing bowl, cream shortening and 3/4 cup sugar until light and fluffy. Add molasses and egg; beat well. In another bowl combine dry ingredients and mix with fork. Stir dry ingredients into creamed mixture, mixing well.
65
+ Chill cookie dough for 2 hours. Shape in 1-inch balls, then roll each ball in sugar.<p> Place ginger cookies on greased baking sheets and bake in preheated 375&deg; oven for about 12 minutes.<br> Makes about 4 dozen crispy ginger cookies.
66
+
67
+
68
+ <p>
69
+ <b>
70
+
71
+ <a href="/library/rec04/bl40214i.htm">Snickerdoodles</a><br>
72
+ <a href="/library/rec03/bl30408c.htm">Snickerdoodles</a><br>
73
+ <a href="/library/rec03/bl30519y.htm">Gingersnap Cookies III</a><br>
74
+ <a href="/library/rec03/bl30409g.htm">Gingersnaps II</a><br>
75
+ <a href="/library/rec03/bl30321f.htm">Old-Fashioned Ginger Cookies</a><br>
76
+ <a href="/library/rec03/bl30117b.htm">Ginger Cookies with Molasses</a><br>
77
+ <a href="/library/comm/blbb34.htm">DJ's Ginger Cookies</a><br>
78
+ <a href="/library/rec97/bl1214g.htm">Old Fashioned Ginger Snap Cookies</a><br>
79
+ <a href="/library/news/bln456.htm">Soft Chewy Molasses Cookies</a><br>
80
+ <a href="/library/news/bln326.htm">Ginger Tea Cake Cookies</a><br>
81
+ <a href="/library/rec99/blcookies_9o.htm">Gingersnap Cookies</a><br>
82
+ <a href="/library/news/bln341.htm">Soft Molasses Cookies</a><br><br>
83
+
84
+ <a href="/od/spicecookies/">Spice Cookie Recipes</a><br>
85
+ &#9; <a href="/od/cookierecipes/">Cookie Recipes</a><br>
86
+ <a href="/od/molassescookies/">Molasses Cookies</a><br>
87
+ <a href="/od/nobakecookies/">No Bake Cookies</a><br>
88
+ <a href="/od/oatmealcookies/">Oatmeal Cookies</a><br>
89
+ <a href="/od/pbcookies/">Peanut Butter Cookies</a><br>
90
+ <a href="/od/shortbread/">Shortbread</a><br>
91
+ <a href="/od/candyrecipes/">Candy Recipes</a><br>
92
+
93
+ <p>
94
+ </b>
95
+ <b><a href="/library/crock/blcpidx.htm">Slow Cooker Recipes</a>&#9;| <a href="/library/recipes/blpage16.htm">Casseroles</a>&#9;| <a href="/library/recipes/blidx.htm">Main Recipe Index</a><br><a href="/c/ec/1.htm">Weekly Crockpot Recipe Newsletter</a></b>
96
+ </div><!--/gc-->
97
+ </div>
98
+
99
+
100
+ <div id="coda">
101
+ <div class="ugc detail" id="rr"><h3>User Reviews</h3><div class="ur"><div class="rating"><span class="value-title four"><span></span></span>&nbsp;<span><strong>4</strong> out of 5</span></div><div><strong>no name yum!</strong>, Member yay67</div><p><q>These cookies were goods! They be a big hit in me family! we really would make again! You should try it!</q></p><a class="btn rvw" href="http://reviews.about.com/6843-2/3b933jW005mS/submission.htm?bvpage=action.htm&action=AddReview&format=embedded&user=__USERID__&return=http://southernfood.about.com/od/spicecookies/r/bl30512k.htm&loginparams=__BVLOGINPARAMETERS__&submissionparams=sdn%3Dsouthernfood&campaignid=BV_RATING_SUMMARY_ZERO_REVIEWS&submissionurl=__BVSUBMISSIONURL__">Write a review</a><p class="hlp">0 out of 0 people found this helpful.<br>Was this review helpful to you? <a href="http://reviews.about.com/6843-2/3b933jW005mS/submission.htm?bvpage=action.htm&action=AddPositiveFeedback&format=embedded&user=__ALLOWANONYMOUS__&return=http://southernfood.about.com/od/spicecookies/r/bl30512k.htm&review=9313816&loginparams=__BVLOGINPARAMETERS__&submissionparams=sdn%3Dsouthernfood&campaignid=BV_NONE&submissionurl=__BVSUBMISSIONURL__">Yes</a> | <a href="http://reviews.about.com/6843-2/3b933jW005mS/submission.htm?bvpage=action.htm&action=AddNegativeFeedback&format=embedded&user=__ALLOWANONYMOUS__&return=http://southernfood.about.com/od/spicecookies/r/bl30512k.htm&review=9313816&loginparams=__BVLOGINPARAMETERS__&submissionparams=sdn%3Dsouthernfood&campaignid=BV_NONE&submissionurl=__BVSUBMISSIONURL__">No</a></p></div></div>
102
+ <div id="resources">
103
+ <div class="lkbx"><h5>Related Recipes</h5><ul><li><a href="/library/rec04/bl40114a.htm" zT="18/1Pp">Old-Time Raisin Cookies</a></li><li><a href="/library/rec04/bl40214i.htm" zT="18/1Pp">Filled Spice Cookies</a></li><li><a href="/library/rec03/bl30622q.htm" zT="18/1Pp">Molasses Cookies with Spices</a></li></ul></div><div class="lkbx"><h5>Related Recipes</h5><ul><li><a href="/library/rec04/bl40329e.htm" zT="18/1Pp">Moravian Ginger Cookies</a></li><li><a href="/library/rec03/bl30620f.htm" zT="18/1Pp">Spiced Brown Sugar Icebox Cookies</a></li></ul></div><script type="text/javascript">w('<div id="ll"><h5>New posts to the <a href="http://forums.about.com/ab-southernfood/start/?lgnF=y" zT="18/1My" >Southern U.S. Cuisine forums</a>:</h5><ul><li><a href="http://forums.about.com/dir-app/acx/ACDispatch.aspx?action=message&webtag=ab-southernfood&msg=8087" zT="18/1My">Candied Fruit</a></li><li><a href="http://forums.about.com/dir-app/acx/ACDispatch.aspx?action=message&webtag=ab-southernfood&msg=8086" zT="18/1My">cake mix dessert</a></li><li><a href="http://forums.about.com/dir-app/acx/ACDispatch.aspx?action=message&webtag=ab-southernfood&msg=8085" zT="18/1My">Chef on Fire</a></li></ul></div>')</script>
104
+
105
+ <div id="rel"><h5>Related Articles</h5><ul><li><a href="http://southernfood.about.com/od/spicecookies/r/bl30519y.htm" zT="18/1YL/Zn">Gingersnaps Recipe - Gingersnap Cookies with Ginger and Molasses</a></li><li><a href="http://southernfood.about.com/od/spicecookies/r/bl1214g.htm" zT="18/1YL/Zn">Old-Fashioned Ginger Snaps Recipe</a></li><li><a href="http://southernfood.about.com/od/spicecookies/r/bl30626w.htm" zT="18/1YL/Zn">Gingersnaps - Recipe for Gingersnaps with Cinnamon and Molasses</a></li><li><a href="http://southernfood.about.com/od/molassescookies/r/bln326.htm" zT="18/1YL/Zn">Ginger Molasses Tea Cakes</a></li><li><a href="http://southernfood.about.com/od/spicecookies/r/bl40329e.htm" zT="18/1YL/Zn">Ginger Cookies - Recipe for Moravian Ginger Cookies with Spices</a></li></ul></div></div>
106
+ <div id="gi"><div class="cr"><div class="img"><a href="/bio/Diana-Rattray-2.htm" zT="18/1YK"><img src="http://0.tqn.com/d/g/2.jpg" alt="Diana Rattray"></a></div><p><a href="/bio/Diana-Rattray-2.htm" zT="18/1YO">Diana Rattray</a><br>Southern Food&nbsp;Guide since&nbsp;1997</p><ul><li><a href="/gi/pages/stay.htm" zT="18/1YS"><b>Sign up</b> for My Newsletter</a></li></ul><ul class="so"><li><a href="/b/" zT="18/1YM">Headlines</a></li><li><a href="http://forums.about.com/n/pfx/forum.aspx?nav=messages&webtag=ab-southernfood" zT="18/1YN">Forum</a></li></ul></div></div>
107
+ </div>
108
+ </div>
109
+ <div id="aba">
110
+
111
+
112
+
113
+
114
+ <script type="text/javascript">if(z336>0){function rb600(){if(gEI('bb'))gEI('bb').height=600}w('<div id="adB"><p>Advertisement</p>');adunit('','','about.com',ch,gs,336,280,'1','bb',3);w('</div>')}if(z155>0){w('<div id="adP"><p>Advertisement</p>');adunit('','','about.com',ch,gs,336,155,'1','ps',4);w('</div>')}</script>
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+ <script>if(zp[7].d){Dsp(zp[7],'ip')}</script>
125
+
126
+
127
+
128
+ <script type="text/javascript">if(zp[11].d){Dsp(zp[11],'ip')}</script>
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+ </div>
138
+ <script>if(zSbL<1)zSbL=3;zSB(2);zSbL=0</script>
139
+ </div>
140
+ <div id="rs"><span id="n5">Related Searches</span> <a href="http://search.about.com/r.htm?q=ginger snap cookies" zT="18/1lu">ginger snap cookies</a> <a href="http://search.about.com/r.htm?q=soft molasses cookies" zT="18/1lu">soft molasses cookies</a> <a href="http://search.about.com/r.htm?q=peanut butter cookies" zT="18/1lu">peanut butter cookies</a> <a href="http://search.about.com/r.htm?q=recipes slow cooker" zT="18/1lu">recipes slow cooker</a> <a href="http://search.about.com/r.htm?q=slow cooker recipes" zT="18/1lu">slow cooker recipes</a> <a href="http://search.about.com/r.htm?q=ginger cookies" zT="18/1lu">ginger cookies</a></div><div id="abf"> <div id="browse" class="pane clear">
141
+ <h3>Explore Southern Food</h3>
142
+ <div id="bc1">
143
+ <h4>Must Reads</h4>
144
+ <ul><li><a href="http://southernfood.about.com/library/recipes/blidx.htm" zT='18/1fG/1'>Main Recipe Index</a></li><li><a href="/library/crock/blcpidx.htm" zT='18/1fG/2'>Crockpot & Slow Cooker Recipes</a></li><li><a href="http://southernfood.about.com/cs/easterrecipes/a/eastermenu.htm" zT='18/1fG/3'>Easter Menu & Recipes</a></li><li><a href="http://southernfood.about.com/od/chickenrecipes/a/Chicken-Recipes.htm" zT='18/1fG/4'>Chicken Recipes</a></li><li><a href="/od/crockpotchicken/tp/crockpot_chicken.htm" zT='18/1fG/5'>Slow Cooker Chicken Recipes</a></li>
145
+ </ul>
146
+ <h4>Most Popular</h4>
147
+ <ul><li><a href="http://southernfood.about.com/cs/easterrecipes/a/eastermenu.htm" zT="18/yV/O3">Easter Menu</a></li><li><a href="http://southernfood.about.com/od/scallopedpotatoes/r/bl30129v.htm" zT="18/yV/O3">Scalloped Potatoes</a></li><li><a href="http://southernfood.about.com/library/crock/blcpidx.htm" zT="18/yV/O3">Crockpot Recipes - More than 1400 Crockpot Recipes for the C&hellip;</a></li><li><a href="http://southernfood.about.com/od/vegetablesalads/r/bl30608c.htm" zT="18/yV/O3">Seven Layer Salad</a></li><li><a href="http://southernfood.about.com/od/crockpotrecipes/a/Chicken-Recipes-For-The-Slow-Cooker.htm" zT="18/yV/O3">Crockpot Chicken Recipes</a></li>
148
+ </ul>
149
+ </div>
150
+ <div id="bc2">
151
+
152
+
153
+ <div class="tr"><h4>See More About:</h4><ul><li><a href="/lr/ginger/784124/1/" zT="18/1gH" rel="nofollow">ginger</a></li><li><a href="/lr/spice_cookes/784124/2/" zT="18/1gH" rel="nofollow">spice cookes</a></li><li><a href="/lr/molasses_cookies/784124/3/" zT="18/1gH" rel="nofollow">molasses cookies</a></li></ul></div> <script>splitList(getElementsByClassName('tr',gEI('bc2'))[0].getElementsByTagName('ul')[0]);</script>
154
+
155
+ <h4>By Category</h4>
156
+ <ul id="bcl"><li><a href="/od/appetizersandsnacks/Appetizers_Snack_Recipes.htm" zT='18/1hZ/1'>Appetizers and Snacks</a></li><li><a href="/od/beefandgroundbeef/Beef_Recipes_Ground_Beef_Recipes_and_Lamb_Recipes.htm" zT='18/1hZ/2'>Beef and Lamb Recipes</a></li><li><a href="/od/chickenrecipes/Chicken_Turkey_and_other_Poultry_Recipes.htm" zT='18/1hZ/3'>Chicken & Turkey Recipes</a></li><li><a href="/od/crockpotrecipes/Crockpot_Recipes_and_Slow_Cooker_Recipes.htm" zT='18/1hZ/4'>Crockpot Recipes</a></li><li><a href="/od/casserolerecipes/Casserole_Recipes.htm" zT='18/1hZ/5'>Casserole Recipes</a></li><li><a href="/od/porkandham/Pork_Recipes_Pork_and_Ham_and_Sausage.htm" zT='18/1hZ/6'>Pork and Ham Recipes</a></li><li><a href="/od/fishandseafood/Fish_and_Seafood_Recipes.htm" zT='18/1hZ/7'>Fish and Seafood Recipes</a></li><li><a href="/od/cookiesbarsandcandy/Cookie_Recipes_Brownies_and_Bars_and_Candy_Recipes.htm" zT='18/1hZ/8'>Cookies and Candy Recipes</a></li><li><a href="/od/cakespiesdesserts/Dessert_Recipes_Cakes_Pies_Cheesecakes_and_other_Desserts.htm" zT='18/1hZ/9'>Dessert and Cake Recipes</a></li><li><a href="/od/fruitandvegetables/Fruit_and_Vegetable_Recipes.htm" zT='18/1hZ/10'>Fruit and Vegetable Recipes</a></li><li><a href="/od/ricepastaeggscheese/Rice_Recipes_Pasta_Recipes_Cheese_Recipes_Grits_and_Egg_Recipes.htm" zT='18/1hZ/11'>Rice, Pasta, Eggs</a></li><li><a href="/od/breadrecipes/Bread_Recipes_Yeast_Breads_Bread_Machine_Pancakes_Quick_Breads.htm" zT='18/1hZ/12'>Bread Recipes</a></li><li><a href="/od/recipesbycourse/Recipes_by_Type.htm" zT='18/1hZ/13'>Recipes by Type</a></li><li><a href="/od/cookingbasics/Cooking_Basics_Cooking_Instruction_Tips_Measurements_and_More.htm" zT='18/1hZ/14'>Cooking Basics</a></li><li><a href="/od/southernregionalfood/Southern_Recipes_and_Regional_Specialties.htm" zT='18/1hZ/15'>Southern Regional Food</a></li>
157
+ </ul>
158
+ </div>
159
+ </div>
160
+ <script>splitList(gEI('bcl'));</script>
161
+ <script>zau(256,'335px','230px','fp','http://z.about.com/6g/ip/284/27.htm?s=southernfood','','');</script>
162
+ <div class="ma"><div class="lg"><a href="http://www.about.com/" zT="18/1Yb/Zv"><img src="http://0.tqn.com/f/lg/a148.png" alt="About.com"></a></div><h2><a href="/" zT="18/1Yc/Zx" title="Southern Food">Southern Food</a></h2></div><ol class="ct"><li class="h"><a href="http://www.about.com/" zT="18/1Yd/Zz">Home</a></li><li><a href="http://www.about.com/food/" zT="18/1Yd/Zz">Food & Drink</a></li><li><a href="/" zT="18/1Yd/Zz">Southern Food</a></li><li><a href="http://southernfood.about.com/od/cookiesbarsandcandy" zT="18/1Yd/Zz">Cookies and Candy Recipes</a></li><li><a href="http://southernfood.about.com/od/cookierecipes" zT="18/1Yd/Zz">Cookie Recipes</a></li><li><a href="http://southernfood.about.com/od/spicecookies" zT="18/1Yd/Zz">Spice Cookies</a></li><li>Ginger Cookies Recipe - Ginger Cookies with Spices and Molasses</li></ol><div id="lks" class="hl"><ul><li class="f"><a href="/popular.htm" zT="18/1YY">Most Popular</a></li><li><a href="/updated.htm" zT="18/1]c">Latest Articles</a></li><li class="rss"><a href="/gi/pages/stay.htm#rs" zT="18/1YZ/Zt">RSS</a></li></ul></div></div><div id="abi" class="hl"><div id="lftr"><div id="mf"><h6>Also from About.com:</h6><ul><li class="f"><a href="http://caloriecount.about.com/foods/" zT="18/1]2/c[">Calorie Count - Food &amp; Recipe Database</a></li></ul></div><ul id="si"><li class="f"><a href="http://advertise.about.com/" zT="18/1YX/Zr" rel="nofollow">Advertise on About.com</a></li><li><a href="http://www.advertiseonabout.com/Who_We_Are/" zT="18/1YX/Zr" rel="nofollow">Our Story</a></li><li><a href="http://advertiseonabout.com/News_and_Press/" zT="18/1YX/Zr" rel="nofollow">News &amp; Events</a></li><li><a href="http://jobs.about.com/" zT="18/1YX/Zr" rel="nofollow">Work at About</a></li><li><a href="http://spiderbites.about.com/sitemap.htm" zT="18/1YX/Zr">SiteMap</a></li><li><a href="http://azlist.about.com/a.htm" zT="18/1]]">All Topics</a></li><li><a href="http://www.about.com/gi/pages/printrequests.html" zT="18/1YX/Zr" rel="nofollow">Reprints</a></li><li><a href="http://www.about.com/gi/pages/hc.htm" zT="18/1YX/Zr" rel="nofollow">Help</a></li></ul><ul id="li"><li class="f"><a href="http://beaguide.about.com/" zT="18/1YX/Zr" rel="nofollow">Write for About</a></li><li><a href="http://www.about.com/gi/pages/uagree.htm" zT="18/1YX/Zr" rel="nofollow">User Agreement</a></li><li><a href="http://www.about.com/gi/pages/ethics.htm" zT="18/1YX/Zr" rel="nofollow">Ethics Policy</a></li><li><a href="http://www.about.com/gi/pages/patent.htm" zT="18/1YX/Zr" rel="nofollow">Patent Info.</a></li><li><a href="http://www.about.com/gi/pages/mprivacy.htm" zT="18/1YX/Zr" rel="nofollow">Privacy Policy</a></li><li><a href="http://www.about.com/gi/pages/mprivacy.htm#adchoices" zT="18/1YX/Zr" rel="nofollow">Your Ad Choices</a></li></ul></div><div id="di"><p>&copy;2011 About.com. All rights reserved.&nbsp;</p><p>A part of&nbsp;<a href="http://www.nytco.com/" zT="1/1JK">The New York Times Company</a>.</p></div></div>
163
+
164
+
165
+
166
+ <script>if(typeof document.domain!="undefined")document.domain='about.com';check_modal();zCi();validateForms();splitLists();</script>
167
+
168
+
169
+ </div>
170
+ <script>if(this.zKW&&gEI('sv'))gEI('sv').value=zE(zE(zKW,1),1).replace(new RegExp('\\+','g'),' ')</script>
171
+
172
+ <script type="text/javascript"><!--
173
+ adclose()
174
+ //-->
175
+ </script>
176
+
177
+ <script type="text/javascript">var tcdacmd="dt;da";</script>
178
+ <script type="text/javascript" src="http://an.tacoda.net/an/11775/slf.js"></script>
179
+
180
+
181
+ </body></html>
@@ -0,0 +1,1183 @@
1
+ <!DOCTYPE html>
2
+ <!--[if IE 6]>
3
+ <html id="ie6" dir="ltr" lang="en">
4
+ <![endif]-->
5
+ <!--[if (gt IE 6) | (!IE)]><!-->
6
+ <html dir="ltr" lang="en">
7
+ <!--<![endif]-->
8
+ <head>
9
+ <meta charset="UTF-8" />
10
+ <title>Understanding JavaScript&#8217;s this keyword | JavaScript, JavaScript</title>
11
+ <link rel="profile" href="http://gmpg.org/xfn/11" />
12
+ <link rel="stylesheet" type="text/css" media="all" href="http://s1.wp.com/wp-content/themes/pub/coraline/style.css?m=1302624133g" />
13
+ <link rel="pingback" href="http://javascriptweblog.wordpress.com/xmlrpc.php" />
14
+ <link rel="alternate" type="application/rss+xml" title="JavaScript, JavaScript &raquo; Feed" href="http://javascriptweblog.wordpress.com/feed/" />
15
+ <link rel="alternate" type="application/rss+xml" title="JavaScript, JavaScript &raquo; Comments Feed" href="http://javascriptweblog.wordpress.com/comments/feed/" />
16
+ <link rel="alternate" type="application/rss+xml" title="JavaScript, JavaScript &raquo; Understanding JavaScript&#8217;s this&nbsp;keyword Comments Feed" href="http://javascriptweblog.wordpress.com/2010/08/30/understanding-javascripts-this/feed/" />
17
+ <script type="text/javascript">
18
+ /* <![CDATA[ */
19
+ function addLoadEvent(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func;}else{window.onload=function(){oldonload();func();}}}
20
+ /* ]]> */
21
+ </script>
22
+ <link rel="stylesheet" href="http://s0.wp.com/wp-content/themes/h4/global.css?m=1300122934g" type="text/css" />
23
+ <link rel='stylesheet' id='sharedaddy-css' href='http://s1.wp.com/wp-content/mu-plugins/sharing/sharing.css?m=1300122930g&#038;ver=MU' type='text/css' media='all' />
24
+ <script type='text/javascript' src='http://s1.wp.com/wp-includes/js/l10n.js?m=1300122928g&amp;ver=20101110'></script>
25
+ <script type='text/javascript' src='http://s2.wp.com/wp-includes/js/jquery/jquery.js?m=1300122928g&amp;ver=1.4.4'></script>
26
+ <script type='text/javascript' src='http://s1.wp.com/wp-includes/js/comment-reply.js?m=1300122928g&amp;ver=20090102'></script>
27
+ <link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://javascriptweblog.wordpress.com/xmlrpc.php?rsd" />
28
+ <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://javascriptweblog.wordpress.com/wp-includes/wlwmanifest.xml" />
29
+ <link rel='index' title='JavaScript, JavaScript' href='http://javascriptweblog.wordpress.com/' />
30
+ <link rel='prev' title='Byte-Saver Quiz:&nbsp;Answers' href='http://javascriptweblog.wordpress.com/2010/08/23/byte-saver-quiz-answers/' />
31
+ <link rel='next' title='Auto-generating JavaScript Unit&nbsp;Tests' href='http://javascriptweblog.wordpress.com/2010/09/20/auto-generating-javascript-unit-tests/' />
32
+ <meta name="generator" content="WordPress.com" />
33
+ <link rel='canonical' href='http://javascriptweblog.wordpress.com/2010/08/30/understanding-javascripts-this/' />
34
+ <link rel='shortlink' href='http://wp.me/pQpop-ih' />
35
+ <link rel="stylesheet" href="http://s0.wp.com/wp-content/mu-plugins/admin-bar/admin-bar-css.php?t=Coraline&amp;a=&amp;p=&amp;sa=&amp;td=ltr" type="text/css" />
36
+ <!--[if IE 6]><style type="text/css">#wpcombar, #wpcombar .menupop a span, #wpcombar .menupop ul li a:hover, #wpcombar .myaccount a, .quicklinks a:hover,#wpcombar .menupop:hover { background-image: none !important; } #wpcombar .myaccount a { margin-left:0 !important; padding-left:12px !important;}</style><![endif]-->
37
+ <style type="text/css" media="print">#wpcombar { display:none; }</style><link rel="shortcut icon" type="image/x-icon" href="http://s1.wp.com/i/favicon-stacked.ico?m=1300122927g" sizes="16x16 24x24 32x32 48x48" />
38
+ <link rel="icon" type="image/x-icon" href="http://s1.wp.com/i/favicon-stacked.ico?m=1300122927g" sizes="16x16 24x24 32x32 48x48" />
39
+ <link rel="apple-touch-icon" href="http://s0.wp.com/wp-content/themes/h4/i/webclip.png?m=1300122934g" />
40
+ <style type="text/css">
41
+ /* <![CDATA[ */
42
+ #wpcombar li.ab-wpl-like a { outline: none; }
43
+ #wpcombar li.ab-wpl-like a em { font-style: normal }
44
+ #wpcombar li.ab-wpl-like > a { background-image: url( http://s2.wp.com/wp-content/themes/h4/i/like_star.gif ); background-position: 8px 40%; background-repeat: no-repeat; padding-left: 27px }
45
+ #wpcombar li.ab-wpl-like a.loading { background-position: 8px 50% !important; }
46
+ #wpcombar li.like > a { height: 28px; }
47
+ #wpcombar div#reblog { background: #444; color: #fff; }
48
+ div#likes { margin-top: 15px; }
49
+ .like-button { border: 1px solid #eee; padding: 2px 6px; font-size: 13px; font-family: arial, tahoma, sans-serif; }
50
+ #wpl-likebox { clear: left; font-size: 11px; font-family: arial, tahoma, verdana, sans-serif !important; min-height: 30px; margin: 10px 0 !important; padding: 5px 0 10px 0 !important; }
51
+ #wpl-button { float: left; background: url( http://s0.wp.com/i/buttonbg.png ) top left repeat-x; margin-right: 7px; border: 1px solid #d4d4d4; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; }
52
+ #wpl-button a { color: #666 !important; line-height: 130% !important; text-decoration: none !important; outline: none; float: left; padding: 3px 6px 2px 24px !important; font-size: 11px !important; background: url( http://s1.wp.com/i/likestar.png ) 6px 49.8% no-repeat; }
53
+ #wpl-button.liked { background: #feffce; border: 1px solid #f3e389; }
54
+ #wpl-button.liked a { color: #ba871b !important; }
55
+ #wpl-likebox #wpl-count { min-height: 25px; line-height: 130% !important; float: left; padding-top: 4px; }
56
+ #wpl-likebox #wpl-avatars { clear: left; max-height: 98px; overflow: hidden; margin-top: 15px; line-height: 130% !important; }
57
+ #wpl-likebox #wpl-avatars img { border: none !important; }
58
+ #wpl-likebox #wpl-mustlogin { line-height: 14px !important; font-size: 11px; clear: left; margin-top: 5px; background: #f0f0f0; padding: 10px; width: 65%; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; }
59
+ #wpl-likebox #wpl-mustlogin a { color: #888; text-decoration: underline; }
60
+ #wpl-likebox #wpl-mustlogin p { margin: 5px 0; padding: 0 }
61
+ #wpl-likebox #wpl-mustlogin input.input { padding: 2px; background: #fff; font-size: 11px; font-family: inherit; border: 1px solid #ccc; -moz-box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1) inset; -webkit-box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1) inset; line-height: 12px; }
62
+ #wpl-likebox #wpl-mustlogin input#wp-submit { border: 1px solid #ccc; font-size: 11px; background: #fafafa; repeat-x; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; padding: 2px 4px !important; line-height: 12px; }
63
+ #wpl-likebox #wpl-mustlogin label { position: relative; cursor: text; }
64
+ #wpl-likebox #wpl-mustlogin label span { position: absolute; top: 0px; left: 5px; padding: 0 !important; }
65
+ #wpl-likebox #wpl-mustlogin label span { top /*\**/: -10px\9; }
66
+ /* ]]> */
67
+ </style>
68
+ <link rel='openid.server' href='http://javascriptweblog.wordpress.com/?openidserver=1' />
69
+ <link rel='openid.delegate' href='http://javascriptweblog.wordpress.com/' />
70
+ <link rel="search" type="application/opensearchdescription+xml" href="http://javascriptweblog.wordpress.com/osd.xml" title="JavaScript, JavaScript" />
71
+ <link rel="search" type="application/opensearchdescription+xml" href="http://wordpress.com/opensearch.xml" title="WordPress.com" />
72
+ <script type="text/javascript" charset="utf-8">
73
+ try{
74
+ var id = location.hash.match( /\#\!\/entry\/(\d+)/ )[1];
75
+ if ( id ) {
76
+ window.location = "http://javascriptweblog.wordpress.com?p=" + id;
77
+ };
78
+ }catch( error ){
79
+ }
80
+ </script>
81
+ <style type="text/css">
82
+ body { background-color: #f5f6fa; }
83
+ </style>
84
+ <meta name="application-name" content="JavaScript, JavaScript" /><meta name="msapplication-window" content="width=device-width;height=device-height" /><meta name="msapplication-task" content="name=Subscribe;action-uri=http://javascriptweblog.wordpress.com/feed/;icon-uri=http://s1.wp.com/i/favicon-stacked.ico" /><meta name="msapplication-task" content="name=Read Freshly Pressed;action-uri=http://wordpress.com/#fresh;icon-uri=http://s2.wp.com/i/favicon.ico" /><meta name="msapplication-task" content="name=WordPress.com Support;action-uri=http://support.wordpress.com/;icon-uri=http://s2.wp.com/i/favicon.ico" /><meta name="msapplication-task" content="name=WordPress.com Forums;action-uri=http://forums.wordpress.com/;icon-uri=http://s2.wp.com/i/favicon.ico" /></head>
85
+
86
+ <body class="single single-post postid-1133 single-format-standard logged-in two-column content-sidebar">
87
+ <div id="container" class="hfeed">
88
+ <div id="header">
89
+ <div id="masthead" role="banner">
90
+ <div id="site-title">
91
+ <span>
92
+ <a href="http://javascriptweblog.wordpress.com/" title="JavaScript, JavaScript" rel="home">JavaScript, JavaScript</a>
93
+ </span>
94
+ </div>
95
+ <div id="site-description"></div>
96
+ </div><!-- #masthead -->
97
+
98
+ <div id="access" role="navigation">
99
+ <div class="skip-link screen-reader-text"><a href="#content" title="Skip to content">Skip to content</a></div>
100
+ <div class="menu"><ul><li ><a href="http://javascriptweblog.wordpress.com/" title="Home">Home</a></li></ul></div>
101
+ </div><!-- #access -->
102
+
103
+ <div id="branding">
104
+ <a href="http://javascriptweblog.wordpress.com/">
105
+ <img src="http://javascriptweblog.files.wordpress.com/2010/08/cropped-notes2.jpg" width="990" height="180" alt="" />
106
+ </a>
107
+ </div><!-- #branding -->
108
+ </div><!-- #header -->
109
+
110
+ <div id="content-box">
111
+
112
+ <div id="content-container">
113
+ <div id="content" role="main">
114
+
115
+
116
+ <div id="nav-above" class="navigation">
117
+ <div class="nav-previous"><a href="http://javascriptweblog.wordpress.com/2010/08/23/byte-saver-quiz-answers/" rel="prev"><span class="meta-nav">&larr;</span> Byte-Saver Quiz:&nbsp;Answers</a></div>
118
+ <div class="nav-next"><a href="http://javascriptweblog.wordpress.com/2010/09/20/auto-generating-javascript-unit-tests/" rel="next">Auto-generating JavaScript Unit&nbsp;Tests <span class="meta-nav">&rarr;</span></a></div>
119
+ </div><!-- #nav-above -->
120
+
121
+ <div id="post-1133" class="post-1133 post type-post status-publish format-standard hentry category-javascript tag-executioncontext tag-property-variable tag-this">
122
+ <h1 class="entry-title">Understanding JavaScript&#8217;s this&nbsp;keyword</h1>
123
+
124
+ <div class="entry-meta">
125
+ <span class="meta-prep meta-prep-author">Posted on</span> <a href="http://javascriptweblog.wordpress.com/2010/08/30/understanding-javascripts-this/" title="09:17" rel="bookmark"><span class="entry-date">August 30, 2010</span></a> <span class="byline"><span class="meta-sep">by</span> <span class="author vcard"><a class="url fn n" href="http://javascriptweblog.wordpress.com/author/angusjs/" title="View all posts by Angus Croll">Angus Croll</a></span></span><span class="comments-link"><span class="meta-sep">|</span> <a href="http://javascriptweblog.wordpress.com/2010/08/30/understanding-javascripts-this/#comments" title="Comment on Understanding JavaScript&#8217;s this&nbsp;keyword">11 Comments</a></span>
126
+ </div><!-- .entry-meta -->
127
+
128
+ <div class="entry-content">
129
+ <p>The JavaScript <code>this</code> keyword is ubiquitous yet misconceptions abound. </p>
130
+ <h4 style="color:#02197f;">What you need to know</h4>
131
+ <p>Every execution context has an associated <code>ThisBinding</code> whose lifespan is equal to that of the execution context and whose value is constant. There are three types of execution context: </p>
132
+ <p><span style="text-decoration:underline;"><strong>1. Global context</strong></span><br />
133
+ <code>this</code> is bound to the global object (<code>window</code> in a browser)</p>
134
+ <pre class="brush: jscript; wrap-lines: false;">
135
+ alert(this); //window
136
+ </pre>
137
+ <p><strong><span id="more-1133"></span></strong></p>
138
+ <p><span style="text-decoration:underline;"><strong>2. Function context</strong></span><br />
139
+ There are at least 5 ways to invoke a function. The value of <code>this</code> depends on the method of invocation</p>
140
+ <p><strong>a) Invoke a property</strong><br />
141
+ <code>this</code> is the <a href="http://javascriptweblog.wordpress.com/2010/08/09/variables-vs-properties-in-javascript/" target="_blank">baseValue</a> of the property reference</p>
142
+ <pre class="brush: jscript; wrap-lines: false;">
143
+ var a = {
144
+ b: function() {
145
+ return this;
146
+ }
147
+ };
148
+
149
+ a.b(); //a;
150
+
151
+ a['b'](); //a;
152
+
153
+ var c= {};
154
+ c.d = a.b;
155
+ c.d(); //c
156
+ </pre>
157
+ <p><strong>b) Invoke a variable</strong><br />
158
+ <code>this</code> is the global object</p>
159
+ <pre class="brush: jscript; wrap-lines: false;">
160
+ var a = {
161
+ b: function() {
162
+ return this;
163
+ }
164
+ };
165
+
166
+ var foo = a.b;
167
+ foo(); //window
168
+
169
+ var a = {
170
+ b: function() {
171
+ var c = function() {
172
+ return this;
173
+ }
174
+ return c();
175
+ }
176
+ };
177
+
178
+ a.b(); //window
179
+ </pre>
180
+ <p>The same applies to self invoking functions:</p>
181
+ <pre class="brush: jscript; wrap-lines: false;">
182
+ var a = {
183
+ b: function() {
184
+ return (function() {return this;})()
185
+ }
186
+ };
187
+
188
+ a.b(); //window
189
+ </pre>
190
+ <p><strong>c) Invoke using Function.prototype.call</strong><br />
191
+ <code>this</code> is passed by argument</p>
192
+ <p><strong>d) Invoke using Function.prototype.apply</strong><br />
193
+ <code>this</code> is passed by argument</p>
194
+ <pre class="brush: jscript; wrap-lines: false;">
195
+ var a = {
196
+ b: function() {
197
+ return this;
198
+ }
199
+ };
200
+
201
+ var d = {};
202
+
203
+ a.b.apply(d); //d
204
+ </pre>
205
+ <p><strong>e) Invoke a constructor using new</strong><br />
206
+ <code>this</code> is the newly created object</p>
207
+ <pre class="brush: jscript; wrap-lines: false;">
208
+ var A = function() {
209
+ this.toString = function(){return &quot;I'm an A&quot;};
210
+ };
211
+
212
+ new A(); &quot;I'm an A&quot;
213
+ </pre>
214
+ <p><span style="text-decoration:underline;"><strong>3. Evaluation context</strong></span><br />
215
+ <code>this</code> value is taken from the <code>this</code> value of the calling execution context</p>
216
+ <pre class="brush: jscript; wrap-lines: false;">
217
+ alert(eval('this==window'); //true - (except firebug, see above)
218
+
219
+ var a = {
220
+ b: function() {
221
+ eval('alert(this==a)');
222
+ }
223
+ };
224
+
225
+ a.b(); //true;
226
+ </pre>
227
+ <p>.</p>
228
+ <h4 style="color:#02197f;">What you might want to know</h4>
229
+ <p>This section explores the process by which <code>this</code> gets its value in the functional context &#8211; using <a href="http://www.ecmascript.org/docs/tc39-2009-043.pdf" target="_blank">ECMA 5 262</a> as a reference.</p>
230
+ <p>Lets start with the ECMAScript definition of <code>this</code>:</p>
231
+ <div style="background-color:#eaf2fa;">The <code>this</code> keyword evaluates to the value of the <code>ThisBinding</code> of the current execution context.</div>
232
+ <p>from <strong>ECMA 5, 11.1.1</strong></p>
233
+ <p><strong>How is <code>ThisBinding</code> set?</strong></p>
234
+ <p>Each function defines a [[Call]] internal method (<strong>ECMA 5, 13.2.1 [[Call]]</strong>) which passes invocation values to the function&#8217;s execution context:</p>
235
+ <div style="background-color:#eaf2fa;">The following steps are performed when control enters the execution context for function code contained in function object F, a caller provided thisValue, and a caller provided argumentsList:<br />
236
+ 1. If the function code is strict code, set the ThisBinding to thisValue.<br />
237
+ 2. Else if thisValue is null or undefined, set the ThisBinding to the global object.<br />
238
+ 3. Else if Type(thisValue) is not Object, set the ThisBinding to ToObject(thisValue).<br />
239
+ 4. Else set the ThisBinding to thisValue</div>
240
+ <p>from <strong>ECMA 5, 10.4.3 Entering Function Code</strong> (slightly edited)</p>
241
+ <p>In other words <code>ThisBinding</code> is set to the object coercion of the abstract argument <code>thisValue</code>, or if <code>thisValue</code> is undefined, the global object (unless running in strict mode in which case <code>thisValue</code> is assigned to <code>ThisBinding</code> as-is)</p>
242
+ <p><strong>So where does <code>thisValue</code> come from?</strong></p>
243
+ <p>Here we need to go back to our 5 types of function invocation:</p>
244
+ <p><strong><em>1. Invoke a property</em><br />
245
+ <em>2. Invoke a variable</em></strong></p>
246
+ <p>in ECMAScript parlance these are <em>Function Calls</em> and have two components: a <em>MemberExpression</em> and an <em>Argument</em>s list.</p>
247
+ <div style="background-color:#eaf2fa;">1. Let ref be the result of evaluating MemberExpression.<br />
248
+ 2. Let func be GetValue(ref).<br />
249
+ 6. If Type(ref) is Reference, then<br />
250
+ &nbsp;&nbsp;&nbsp;&nbsp;a. If IsPropertyReference(ref) is true<br />
251
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i. Let thisValue be GetBase(ref).<br />
252
+ &nbsp;&nbsp;&nbsp;&nbsp;b. Else, the base of ref is an Environment Record<br />
253
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i. Let thisValue be the result of calling the ImplicitThisValue concrete method of GetBase(ref).<br />
254
+ 8. Return the result of calling the [[Call]] internal method on func, providing thisValue as the this value and<br />
255
+ providing the list argList as the argument values</div>
256
+ <p>from <strong>ECMA 5, 11.2.3 Function Calls</strong></p>
257
+ <p>So, in essence, <code>thisValue </code>becomes the <a href="http://javascriptweblog.wordpress.com/2010/08/09/variables-vs-properties-in-javascript/" target="_blank">baseValue</a> of the function expression (see step 6, above).</p>
258
+ <p>Where the function is expressed as a <strong>property</strong> the <code>baseValue </code>is the identifier preceding the dot (or square bracket).</p>
259
+ <p><strong>foo</strong>.bar(); //<code>foo</code> assigned to <code>thisValue</code><br />
260
+ <strong>foo</strong>['bar'](); //<code>foo</code> assigned to <code>thisValue</code></p>
261
+ <pre class="brush: jscript; wrap-lines: false;">var foo = {
262
+ bar:function() {
263
+ //(Comments apply to example invocation only)
264
+ //MemberExpression = foo.bar
265
+ //thisValue = foo
266
+ //ThisBinding = foo
267
+ return this;
268
+ }
269
+ };
270
+ foo.bar(); //foo </pre>
271
+ <p>For <strong>variables</strong> the <code>baseValue</code> is the VariableObject (the &#8220;Environment Record&#8221; above) which is a <em>Declarative Environment Record</em>. <strong>ECMA 10.2.1.1</strong> tells us that the <code>ImplcitThisValue</code> of a Declarative Environment Record is undefined.</p>
272
+ <p>var bar = function() {&#8230;};<br />
273
+ bar(); //<code>thisValue </code> is undefined</p>
274
+ <p>Revisiting <strong>10.4.3 Entering Function Code</strong> (see above) we see that unless in strict mode, an undefined <code>thisValue</code> results in a <code>ThisBinding</code> value of global object. So <code>this</code> in a variable function invocation will be the global object.</p>
275
+ <p>In full&#8230;</p>
276
+ <pre class="brush: jscript; wrap-lines: false;">var bar = function() {
277
+ //(Comments apply to example invocation only)
278
+ //MemberExpression = bar
279
+ //thisValue = undefined
280
+ //ThisBinding = global object (e.g. window)
281
+ return this
282
+ };
283
+ bar(); //window</pre>
284
+ <p>.</p>
285
+ <p><strong><em>3. Invoke using Function.prototype.apply</em><br />
286
+ <em>4. Invoke using Function.prototype.call</em></strong></p>
287
+ <p>(specifications at <strong>15.3.4.3 Function.prototype.apply</strong> and <strong>15.3.4.4 Function.prototype.call</strong>)</p>
288
+ <p>These sections describe how, in call and apply invocations, the actual value of the function&#8217;s this argument (i.e. its first argument) is passed as the thisValue to <strong>10.4.3 Entering Function Code</strong>. (Note this differs from ECMA 3 where primitive thisArg values undergo a toObject transformation, and null or undefined values are converted to the global object &#8211; but the difference will normally be negligible since the value will undergo identical transformations in the target function invocation (as we&#8217;ve already seen in <strong>10.4.3 Entering Function Code</strong>))</p>
289
+ <p><strong><em>5. Invoke a constructor using new</em></strong></p>
290
+ <div style="background-color:#eaf2fa;">When the [[Construct]] internal method for a Function object F is called with a possibly empty list of arguments, the following steps are taken:<br />
291
+ 1. Let obj be a newly created native ECMAScript object.<br />
292
+ 8. Let result be the result of calling the [[Call]] internal property of F, providing obj as the thisValue and providing the argument list passed into [[Construct]] as args.<br />
293
+ 10. Return obj.</div>
294
+ <p>from <strong>ECMA 5, 13.2.2 [[Construct]]</strong></p>
295
+ <p>This is pretty clear. Invoking the constructor with <code>new</code> creates an object that gets assigned as the thisValue. It&#8217;s also a radical departure from any other usage of <code>this</code>.</p>
296
+ <h4 style="color:#02197f;">House Cleaning</h4>
297
+ <p><strong>Strict mode</strong><br />
298
+ In ECMAScript&#8217;s strict mode, the <code>thisValue</code> is not coerced to an object. A<br />
299
+ <code>this</code> value of <code>null</code> or <code>undefined</code> is not converted to the global object and primitive values are not converted to wrapper objects</p>
300
+ <p><strong>The bind function</strong><br />
301
+ <code>Function.prototype.bind</code> is new in ECMAScript 5 but will already be familiar to users of major frameworks. Based on call/apply it allows you to prebake the <code>thisValue</code> of an execution context using simple syntax. This is especially useful for event handling code, for example a function to be invoked by a button click, where the <code>ThisBinding</code> of the handler will default to the <code>baseValue</code> of the property being invoked &#8211; i.e. the button element:</p>
302
+ <pre class="brush: jscript; wrap-lines: false;">
303
+ //Bad Example: fails because ThisBinding of handler will be button
304
+ var sorter = {
305
+ sort: function() {
306
+ alert('sorting');
307
+ },
308
+ requestSorting: function() {
309
+ this.sort();
310
+ }
311
+ }
312
+ $('sortButton').onclick = sorter.requestSorting;
313
+ </pre>
314
+ <pre class="brush: jscript; wrap-lines: false;">
315
+ //Good Example: sorter baked into ThisBinding of handler
316
+ var sorter = {
317
+ sort: function() {
318
+ alert('sorting');
319
+ },
320
+ requestSorting: function() {
321
+ this.sort();
322
+ }
323
+ }
324
+ $('sortButton').onclick = sorter.requestSorting.bind(sorter);
325
+ </pre>
326
+ <h4 style="color:#02197f;">Further Reading</h4>
327
+ <p><a href="http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf" target="_blank">ECMA 262 5th Edition (PDF)</a><br />
328
+ 11.1.1 <em>Definition of <code>this</code></em><br />
329
+ 10.4.3 <em>Entering Function Code</em><br />
330
+ 11.2.3 <em>Function Calls</em><br />
331
+ 13.2.1 <em>[[Call]]</em><br />
332
+ 10.2.1.1 <em>Declarative Environment Record (ImplicitThisValue)</em><br />
333
+ 13.2.2 <em>[[Construct]]</em><br />
334
+ 15.3.4.3 <em>Function.prototype.apply</em><br />
335
+ 15.3.4.4 <em>Function.prototype.call</em><br />
336
+ 15.3.4.5 <em>Function.prototype.bind</em><br />
337
+ Annex C <em>The Strict Mode of ECMAScript </em>
338
+ <div class="snap_nopreview sharing robots-nocontent">
339
+ <ul>
340
+ <li class="sharing_label">Share this:</li>
341
+ <li class="share-twitter share-regular">
342
+ <div class="twitter_button"><iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwp.me%2FpQpop-ih&#038;counturl=http%3A%2F%2Fjavascriptweblog.wordpress.com%2F2010%2F08%2F30%2Funderstanding-javascripts-this%2F&#038;count=horizontal&#038;text=Understanding%20JavaScript%27s%20this%20keyword%20: " style="width:97px; height:20px;"></iframe></div>
343
+ </li>
344
+ <li class="share-end"></li>
345
+ </ul>
346
+ <div class="sharing-clear"></div>
347
+ </div>
348
+ <div style="margin-top: 1em" class="possibly-related"><hr /><p><strong>Possibly related posts: (automatically generated)</strong></p><ul><li><a rel='related' href='http://javascriptweblog.wordpress.com/2010/06/28/understanding-javascript-timers/' style='font-weight:bold'>Understanding JavaScript Timers</a></li><li><a rel='related' href='http://javascriptweblog.wordpress.com/2010/08/09/variables-vs-properties-in-javascript/' style='font-weight:bold'>Variables vs. Properties in JavaScript</a></li></ul></div><div id="ilikeposts"></div> </div><!-- .entry-content -->
349
+
350
+ <div class="entry-info">
351
+ This entry was posted in <a href="http://en.wordpress.com/tag/javascript/" title="View all posts in JavaScript" rel="category tag">JavaScript</a> and tagged <a href="http://en.wordpress.com/tag/executioncontext/" rel="tag">executionContext</a>, <a href="http://en.wordpress.com/tag/property-variable/" rel="tag">property variable</a>, <a href="http://en.wordpress.com/tag/this/" rel="tag">this</a>. Bookmark the <a href="http://javascriptweblog.wordpress.com/2010/08/30/understanding-javascripts-this/" title="Permalink to Understanding JavaScript&#8217;s this&nbsp;keyword" rel="bookmark">permalink</a>. </div><!-- .entry-info -->
352
+ </div><!-- #post-## -->
353
+
354
+ <div id="nav-below" class="navigation">
355
+ <div class="nav-previous"><a href="http://javascriptweblog.wordpress.com/2010/08/23/byte-saver-quiz-answers/" rel="prev"><span class="meta-nav">&larr;</span> Byte-Saver Quiz:&nbsp;Answers</a></div>
356
+ <div class="nav-next"><a href="http://javascriptweblog.wordpress.com/2010/09/20/auto-generating-javascript-unit-tests/" rel="next">Auto-generating JavaScript Unit&nbsp;Tests <span class="meta-nav">&rarr;</span></a></div>
357
+ </div><!-- #nav-below -->
358
+
359
+ <div id="wpl-likebox"><div id="wpl-button"><a href='http://javascriptweblog.wordpress.com/2010/08/30/understanding-javascripts-this/?like=1&amp;_wpnonce=36b6bac185' title='I like this post' class='like' rel='nofollow'><span>Like</span></a></div><div id="wpl-count">Be the first to like this post.</div></div>
360
+ <div id="comments">
361
+
362
+
363
+ <h3 id="comments-title">11 Responses to <span>Understanding JavaScript&#8217;s this&nbsp;keyword</span></h3>
364
+
365
+
366
+ <ol class="commentlist">
367
+ <li class="comment even thread-even depth-1" id="li-comment-542">
368
+ <div id="comment-542">
369
+ <div class="comment-author vcard">
370
+ <img alt='' src='http://0.gravatar.com/avatar/882f228c4993ccf0a86e96394636415c?s=48&amp;d=monsterid&amp;r=G' class='avatar avatar-48' height='48' width='48' />
371
+ <cite class="fn"><a href='http://dmitrysoshnikov.com' rel='external nofollow' class='url'>Dmitry A. Soshnikov</a></cite>
372
+
373
+ <span class="comment-meta commentmetadata">
374
+ |
375
+ <a href="http://javascriptweblog.wordpress.com/2010/08/30/understanding-javascripts-this/#comment-542">
376
+ August 30, 2010 at 09:53</a>
377
+ |
378
+ <a class='comment-reply-link' href='/2010/08/30/understanding-javascripts-this/?replytocom=542#respond' onclick='return addComment.moveForm("comment-542", "542", "respond", "1133")'>Reply</a> </span><!-- .comment-meta .commentmetadata -->
379
+ </div><!-- .comment-author .vcard -->
380
+
381
+ <div class="comment-body"><p>Good overview, congrats.</p>
382
+ <p>In addition, don&#8217;t forget some subtle cases such when seems that we have your case <em>(a) Invoke a property</em>, but <em>thisValue</em> isn&#8217;t set to <em>base</em> of reference, because there is no reference:</p>
383
+ <p>[js]<br />
384
+ foo.bar(); // foo<br />
385
+ (foo.bar)(); // foo<br />
386
+ (foo.bar = foo.bar)(); // global<br />
387
+ (foo.bar || foo.baz)(); // global<br />
388
+ (function () {})(); // global<br />
389
+ [/js] </p>
390
+ <p>Dmitry.</p>
391
+ </div>
392
+
393
+ </div><!-- #comment-## -->
394
+
395
+ <ul class='children'>
396
+ <li class="comment byuser comment-author-angusjs bypostauthor odd alt depth-2" id="li-comment-543">
397
+ <div id="comment-543">
398
+ <div class="comment-author vcard">
399
+ <img alt='' src='http://1.gravatar.com/avatar/d8eb53574a39b25e6b89a7282deb9f74?s=48&amp;d=monsterid&amp;r=G' class='avatar avatar-48' height='48' width='48' />
400
+ <cite class="fn"><a href='http://javascriptweblog.wordpress.com' rel='external nofollow' class='url'>Angus Croll</a></cite>
401
+
402
+ <span class="comment-meta commentmetadata">
403
+ |
404
+ <a href="http://javascriptweblog.wordpress.com/2010/08/30/understanding-javascripts-this/#comment-543">
405
+ August 30, 2010 at 10:52</a>
406
+ |
407
+ <a class='comment-reply-link' href='/2010/08/30/understanding-javascripts-this/?replytocom=543#respond' onclick='return addComment.moveForm("comment-543", "543", "respond", "1133")'>Reply</a> </span><!-- .comment-meta .commentmetadata -->
408
+ </div><!-- .comment-author .vcard -->
409
+
410
+ <div class="comment-body"><p>Hi Dmitry &#8211; thanks for your feedback.<br />
411
+ These are good examples &#8211; I covered self-invoking functions already &#8211; I will try to incorporate the others</p>
412
+ </div>
413
+
414
+ </div><!-- #comment-## -->
415
+
416
+ </li>
417
+ </ul>
418
+ </li>
419
+ <li class="comment even thread-odd thread-alt depth-1" id="li-comment-544">
420
+ <div id="comment-544">
421
+ <div class="comment-author vcard">
422
+ <img alt='' src='http://1.gravatar.com/avatar/97981f97e272edf03f5612f4aba40239?s=48&amp;d=monsterid&amp;r=G' class='avatar avatar-48' height='48' width='48' />
423
+ <cite class="fn"><a href='http://qfox.nl' rel='external nofollow' class='url'>Peter van der Zee</a></cite>
424
+
425
+ <span class="comment-meta commentmetadata">
426
+ |
427
+ <a href="http://javascriptweblog.wordpress.com/2010/08/30/understanding-javascripts-this/#comment-544">
428
+ August 30, 2010 at 11:59</a>
429
+ |
430
+ <a class='comment-reply-link' href='/2010/08/30/understanding-javascripts-this/?replytocom=544#respond' onclick='return addComment.moveForm("comment-544", "544", "respond", "1133")'>Reply</a> </span><!-- .comment-meta .commentmetadata -->
431
+ </div><!-- .comment-author .vcard -->
432
+
433
+ <div class="comment-body"><p>Gotta catch &#8216;em all! And you did&#8230; :p and Dmitry catched pretty much all the edge cases around. Another nice article covering a complex JS/ES matter.</p>
434
+ </div>
435
+
436
+ </div><!-- #comment-## -->
437
+
438
+ </li>
439
+ <li class="comment odd alt thread-even depth-1" id="li-comment-549">
440
+ <div id="comment-549">
441
+ <div class="comment-author vcard">
442
+ <img alt='' src='http://0.gravatar.com/avatar/6766096e8ae81ad6b3b82b9c12be19e0?s=48&amp;d=monsterid&amp;r=G' class='avatar avatar-48' height='48' width='48' />
443
+ <cite class="fn"><a href='http://fitzgeraldnick.com/' rel='external nofollow' class='url'>Nick Fitzgerald</a></cite>
444
+
445
+ <span class="comment-meta commentmetadata">
446
+ |
447
+ <a href="http://javascriptweblog.wordpress.com/2010/08/30/understanding-javascripts-this/#comment-549">
448
+ August 31, 2010 at 00:16</a>
449
+ |
450
+ <a class='comment-reply-link' href='/2010/08/30/understanding-javascripts-this/?replytocom=549#respond' onclick='return addComment.moveForm("comment-549", "549", "respond", "1133")'>Reply</a> </span><!-- .comment-meta .commentmetadata -->
451
+ </div><!-- .comment-author .vcard -->
452
+
453
+ <div class="comment-body"><p>One of the common stumbles for new JavaScripters <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif?m=1300122929g' alt=':)' class='wp-smiley' /> </p>
454
+ <p>&#8230; and also why I prefer closures to objects. It&#8217;s just generally more concise and robust (don&#8217;t need to worry about what context the function might be called in eventually) if you use closures instead of properties of `this`.</p>
455
+ <p>Personally, I prefer this version of your example:</p>
456
+ <pre>
457
+ var sorter = (function () {
458
+ var sort = function() {
459
+ alert('sorting');
460
+ };
461
+ return function(ev) {
462
+ sort(ev.target);
463
+ };
464
+ }());
465
+ $('sortButton').onclick = sorter;
466
+ </pre>
467
+ <p>Keep these articles coming Angus <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif?m=1300122929g' alt=':)' class='wp-smiley' /> </p>
468
+ </div>
469
+
470
+ </div><!-- #comment-## -->
471
+
472
+ <ul class='children'>
473
+ <li class="comment byuser comment-author-angusjs bypostauthor even depth-2" id="li-comment-550">
474
+ <div id="comment-550">
475
+ <div class="comment-author vcard">
476
+ <img alt='' src='http://1.gravatar.com/avatar/d8eb53574a39b25e6b89a7282deb9f74?s=48&amp;d=monsterid&amp;r=G' class='avatar avatar-48' height='48' width='48' />
477
+ <cite class="fn"><a href='http://javascriptweblog.wordpress.com' rel='external nofollow' class='url'>Angus Croll</a></cite>
478
+
479
+ <span class="comment-meta commentmetadata">
480
+ |
481
+ <a href="http://javascriptweblog.wordpress.com/2010/08/30/understanding-javascripts-this/#comment-550">
482
+ August 31, 2010 at 08:43</a>
483
+ |
484
+ <a class='comment-reply-link' href='/2010/08/30/understanding-javascripts-this/?replytocom=550#respond' onclick='return addComment.moveForm("comment-550", "550", "respond", "1133")'>Reply</a> </span><!-- .comment-meta .commentmetadata -->
485
+ </div><!-- .comment-author .vcard -->
486
+
487
+ <div class="comment-body"><p>Yep totally agree. Closures ftw! Sometimes the value of this seems to verge on arbitrary. Google &#8220;javascript this keyword&#8221;: nobody can really encapsulate the meaning without meandering off into edge cases.</p>
488
+ <p>Peter Michaux includes &#8216;this&#8217; as a JavaScript warning word<br />
489
+ <a href="http://peter.michaux.ca/articles/javascript-warning-words" rel="nofollow">http://peter.michaux.ca/articles/javascript-warning-words</a><br />
490
+ and wrote a nice piece about this free widget definition<br />
491
+ <a href="http://peter.michaux.ca/articles/javascript-widgets-without-this" rel="nofollow">http://peter.michaux.ca/articles/javascript-widgets-without-this</a></p>
492
+ </div>
493
+
494
+ </div><!-- #comment-## -->
495
+
496
+ </li>
497
+ </ul>
498
+ </li>
499
+ <li class="comment odd alt thread-odd thread-alt depth-1" id="li-comment-557">
500
+ <div id="comment-557">
501
+ <div class="comment-author vcard">
502
+ <img alt='' src='http://0.gravatar.com/avatar/a46583ba1465935557efcde3822752d1?s=48&amp;d=monsterid&amp;r=G' class='avatar avatar-48' height='48' width='48' />
503
+ <cite class="fn">rasmusfl0e</cite>
504
+
505
+ <span class="comment-meta commentmetadata">
506
+ |
507
+ <a href="http://javascriptweblog.wordpress.com/2010/08/30/understanding-javascripts-this/#comment-557">
508
+ September 2, 2010 at 05:03</a>
509
+ |
510
+ <a class='comment-reply-link' href='/2010/08/30/understanding-javascripts-this/?replytocom=557#respond' onclick='return addComment.moveForm("comment-557", "557", "respond", "1133")'>Reply</a> </span><!-- .comment-meta .commentmetadata -->
511
+ </div><!-- .comment-author .vcard -->
512
+
513
+ <div class="comment-body"><p>Thanks for helping de-voodoofying <em>this</em> <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif?m=1300122929g' alt=':)' class='wp-smiley' /> </p>
514
+ <p>I think I&#8217;ll be making references to functions instead of blindly doing .bind(this) &#8211; it&#8217;s measureably faster even in Chrome (with the new native bind)</p>
515
+ </div>
516
+
517
+ </div><!-- #comment-## -->
518
+
519
+ </li>
520
+ <li class="comment even thread-even depth-1" id="li-comment-562">
521
+ <div id="comment-562">
522
+ <div class="comment-author vcard">
523
+ <img alt='' src='http://1.gravatar.com/avatar/f1fcf834ddad415f60d29c87cc10d4d4?s=48&amp;d=monsterid&amp;r=G' class='avatar avatar-48' height='48' width='48' />
524
+ <cite class="fn"><a href='http://perfectionkills.com/' rel='external nofollow' class='url'>kangax</a></cite>
525
+
526
+ <span class="comment-meta commentmetadata">
527
+ |
528
+ <a href="http://javascriptweblog.wordpress.com/2010/08/30/understanding-javascripts-this/#comment-562">
529
+ September 3, 2010 at 12:28</a>
530
+ |
531
+ <a class='comment-reply-link' href='/2010/08/30/understanding-javascripts-this/?replytocom=562#respond' onclick='return addComment.moveForm("comment-562", "562", "respond", "1133")'>Reply</a> </span><!-- .comment-meta .commentmetadata -->
532
+ </div><!-- .comment-author .vcard -->
533
+
534
+ <div class="comment-body"><p>I would also add that `with` statement — quite expectedly — makes for confusing behavior when it comes to `this` value:</p>
535
+ <p>For example, normally you would think that `foo()` invokes `foo` with `this` value referencing Global object; however, when executed as part of a `with` statement, `this` might well reference an object inserted into the scope chain.</p>
536
+ <pre>
537
+ var obj = { foo: function(){ return this }};
538
+ with(obj) {
539
+ foo(); // `this` now references `foo` object, not Global one
540
+ }
541
+ </pre>
542
+ </div>
543
+
544
+ </div><!-- #comment-## -->
545
+
546
+ </li>
547
+ <li class="post pingback">
548
+ <p>Pingback: <a href='http://blog.lj831015.com/?p=343' rel='external nofollow' class='url'>Understanding the JavaScript Execution Context and the Usage of this Keyword &lsaquo; 朝七晚九 &ndash; Phd Student</a></p>
549
+ </li>
550
+ <li class="comment odd alt thread-odd thread-alt depth-1" id="li-comment-2623">
551
+ <div id="comment-2623">
552
+ <div class="comment-author vcard">
553
+ <img alt='' src='http://0.gravatar.com/avatar/eb2fd4fc5dd468c43ae4506769428c22?s=48&amp;d=monsterid&amp;r=G' class='avatar avatar-48' height='48' width='48' />
554
+ <cite class="fn"><a href='http://horia.me' rel='external nofollow' class='url'>Horia Dragomir</a></cite>
555
+
556
+ <span class="comment-meta commentmetadata">
557
+ |
558
+ <a href="http://javascriptweblog.wordpress.com/2010/08/30/understanding-javascripts-this/#comment-2623">
559
+ April 23, 2011 at 07:08</a>
560
+ |
561
+ <a class='comment-reply-link' href='/2010/08/30/understanding-javascripts-this/?replytocom=2623#respond' onclick='return addComment.moveForm("comment-2623", "2623", "respond", "1133")'>Reply</a> </span><!-- .comment-meta .commentmetadata -->
562
+ </div><!-- .comment-author .vcard -->
563
+
564
+ <div class="comment-body"><p>This is the clearest and most thought through explanation I&#8217;ve seen so far.</p>
565
+ <p>Good job on <i>this</i> one!</p>
566
+ </div>
567
+
568
+ </div><!-- #comment-## -->
569
+
570
+ </li>
571
+ <li class="post pingback">
572
+ <p>Pingback: <a href='http://www.netcrema.net/?p=81700' rel='external nofollow' class='url'>Understanding JavaScript’s this keyword | JavaScript, JavaScript &laquo; Netcrema &#8211; creme de la social news via digg + delicious + stumpleupon + reddit</a></p>
573
+ </li>
574
+ <li class="comment even thread-even depth-1" id="li-comment-2626">
575
+ <div id="comment-2626">
576
+ <div class="comment-author vcard">
577
+ <img alt='' src='http://0.gravatar.com/avatar/848810b47f0470175b1f8ac2234d936f?s=48&amp;d=monsterid&amp;r=G' class='avatar avatar-48' height='48' width='48' />
578
+ <cite class="fn">Lemontree75</cite>
579
+
580
+ <span class="comment-meta commentmetadata">
581
+ |
582
+ <a href="http://javascriptweblog.wordpress.com/2010/08/30/understanding-javascripts-this/#comment-2626">
583
+ April 23, 2011 at 09:15</a>
584
+ |
585
+ <a class='comment-reply-link' href='/2010/08/30/understanding-javascripts-this/?replytocom=2626#respond' onclick='return addComment.moveForm("comment-2626", "2626", "respond", "1133")'>Reply</a> </span><!-- .comment-meta .commentmetadata -->
586
+ </div><!-- .comment-author .vcard -->
587
+
588
+ <div class="comment-body"><p>Is this complexity intentional?<br />
589
+ If yes, what are the use cases they wanted to address?</p>
590
+ <p>I really can&#8217;t understand why someone wanted such a mess to be in a programming language!</p>
591
+ </div>
592
+
593
+ </div><!-- #comment-## -->
594
+
595
+ </li>
596
+ </ol>
597
+
598
+
599
+
600
+ <div id="respond">
601
+ <h3 id="reply-title">Leave a Reply <small><a rel="nofollow" id="cancel-comment-reply-link" href="/2010/08/30/understanding-javascripts-this/#respond" style="display:none;">Cancel reply</a></small></h3>
602
+ <form action="http://javascriptweblog.wordpress.com/wp-comments-post.php" method="post" id="commentform">
603
+ <p class="logged-in-as">Logged in as <a href="http://javascriptweblog.wordpress.com/wp-admin/profile.php">Lauren B.</a>. <a href="http://javascriptweblog.wordpress.com/wp-login.php?action=logout&amp;redirect_to=http%3A%2F%2Fjavascriptweblog.wordpress.com%2F2010%2F08%2F30%2Funderstanding-javascripts-this%2F&amp;_wpnonce=2ec865dccd" title="Log out of this account">Log out?</a></p> <p class="comment-form-comment"><label for="comment">Comment</label><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p> <p class="form-allowed-tags">You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: <code>&lt;a href=&quot;&quot; title=&quot;&quot;&gt; &lt;abbr title=&quot;&quot;&gt; &lt;acronym title=&quot;&quot;&gt; &lt;b&gt; &lt;blockquote cite=&quot;&quot;&gt; &lt;cite&gt; &lt;code&gt; &lt;pre&gt; &lt;del datetime=&quot;&quot;&gt; &lt;em&gt; &lt;i&gt; &lt;q cite=&quot;&quot;&gt; &lt;strike&gt; &lt;strong&gt; </code></p> <p class="form-submit">
604
+ <input name="submit" type="submit" id="submit" value="Post Comment" />
605
+ <input type='hidden' name='comment_post_ID' value='1133' id='comment_post_ID' />
606
+ <input type='hidden' name='comment_parent' id='comment_parent' value='0' />
607
+ </p>
608
+
609
+ <input type="hidden" name="genseq" value="1303615281" />
610
+ <p class="comment-subscription-form"><input type="checkbox" name="subscribe" id="subscribe" value="subscribe" style="width: auto;" tabindex="6"/> <label class="subscribe-label" id="subscribe-label" for="subscribe">Notify me of follow-up comments via email.</label></p><p class="comment-subscription-form"><input type="checkbox" name="subscribe_blog" id="subscribe_blog" value="subscribe" style="width: auto;" tabindex="7"/> <label class="subscribe-label" id="subscribe-blog-label" for="subscribe_blog">Send me site updates</label></p><input type="hidden" name="sub-type" value="comment-form-text3" /><p style="display: none;"><input type="hidden" id="akismet_comment_nonce" name="akismet_comment_nonce" value="716371953f" /></p> </form>
611
+ </div><!-- #respond -->
612
+
613
+ </div><!-- #comments -->
614
+
615
+ </div><!-- #content -->
616
+ </div><!-- #content-container -->
617
+
618
+
619
+
620
+ <div id="primary" class="widget-area" role="complementary">
621
+ <ul class="xoxo">
622
+
623
+ <li id="text-3" class="widget-container widget_text"> <div class="textwidget"><a href="http://feeds.feedburner.com/JavascriptJavascript" title="Subscribe to my feed" rel="alternate"><img src="http://www.feedburner.com/fb/images/pub/feed-icon32x32.png" style="border:none;vertical-align:text-middle;" alt=""></a>&nbsp;&nbsp;<a href="http://www.twitter.com/angusTweets"><img src="http://twitter-badges.s3.amazonaws.com/follow_bird-b.png" style="border:none;vertical-align:text-middle;" alt="Follow angusTweets on Twitter" /></a>
624
+ </div>
625
+ </li><li id="text-6" class="widget-container widget_text"><h3 class="widget-title">About me&#8230;</h3> <div class="textwidget"><span style="font-weight:normal;">Angus Croll<br>
626
+ Front End Developer<br>
627
+ <u><a href="http://twitter.com">Twitter</a></u><br>
628
+ San Francisco<br></span></div>
629
+ </li><li id="text-12" class="widget-container widget_text"> <div class="textwidget"><a href='https://developer.mozilla.org/en/javascript' title='JavaScript'><img src='http://static.jsconf.us/promotejsv.gif' height='180' width='140' alt='Learning JavaScript' /></a></div>
630
+ </li> <li id="recent-posts-2" class="widget-container widget_recent_entries"> <h3 class="widget-title">Recent Posts</h3> <ul>
631
+ <li><a href="http://javascriptweblog.wordpress.com/2011/04/04/the-javascript-comma-operator/" title="The JavaScript Comma&nbsp;Operator">The JavaScript Comma&nbsp;Operator</a></li>
632
+ <li><a href="http://javascriptweblog.wordpress.com/2011/02/28/javascript-object-keys-finally/" title="Rethinking JavaScript Object&nbsp;Enumeration">Rethinking JavaScript Object&nbsp;Enumeration</a></li>
633
+ <li><a href="http://javascriptweblog.wordpress.com/2011/02/07/truth-equality-and-javascript/" title="Truth, Equality and&nbsp;JavaScript">Truth, Equality and&nbsp;JavaScript</a></li>
634
+ <li><a href="http://javascriptweblog.wordpress.com/2011/01/18/javascripts-arguments-object-and-beyond/" title="The JavaScript arguments object&#8230;and&nbsp;beyond">The JavaScript arguments object&#8230;and&nbsp;beyond</a></li>
635
+ <li><a href="http://javascriptweblog.wordpress.com/2011/01/04/exploring-javascript-for-in-loops/" title="Exploring JavaScript for-in&nbsp;loops">Exploring JavaScript for-in&nbsp;loops</a></li>
636
+ <li><a href="http://javascriptweblog.wordpress.com/2010/12/22/delegation-vs-inheritance-in-javascript/" title="Delegation vs Inheritance in&nbsp;JavaScript">Delegation vs Inheritance in&nbsp;JavaScript</a></li>
637
+ <li><a href="http://javascriptweblog.wordpress.com/2010/12/07/namespacing-in-javascript/" title="Namespacing in&nbsp;JavaScript">Namespacing in&nbsp;JavaScript</a></li>
638
+ <li><a href="http://javascriptweblog.wordpress.com/2010/11/29/json-and-jsonp/" title="JSON and&nbsp;JSONP">JSON and&nbsp;JSONP</a></li>
639
+ <li><a href="http://javascriptweblog.wordpress.com/2010/11/15/extending-objects-with-javascript-getters/" title="Extending Objects with JavaScript&nbsp;Getters">Extending Objects with JavaScript&nbsp;Getters</a></li>
640
+ <li><a href="http://javascriptweblog.wordpress.com/2010/11/08/javascripts-dream-team-in-praise-of-split-and-join/" title="JavaScript&#8217;s Dream Team: in praise of split and&nbsp;join">JavaScript&#8217;s Dream Team: in praise of split and&nbsp;join</a></li>
641
+ </ul>
642
+ </li><li id="linkcat-1356" class="widget-container widget_links"><h3 class="widget-title">Blogroll</h3>
643
+ <ul class='xoxo blogroll'>
644
+ <li><a href="http://perfectionkills.com/">perfectionkills.com</a></li>
645
+ <li><a href="http://webreflection.blogspot.com/">webreflection</a></li>
646
+ <li><a href="http://www.adequatelygood.com/">adequatelygood.com</a></li>
647
+ <li><a href="http://dailyjs.com/" target="_blank">dailyjs.com</a></li>
648
+ <li><a href="http://osteele.com/" target="_blank">oliver steele</a></li>
649
+ <li><a href="http://dmitrysoshnikov.com/2010/04/">dmitry soshnikov</a></li>
650
+ <li><a href="http://peter.michaux.ca">peter.michaux.ca</a></li>
651
+
652
+ </ul>
653
+ </li>
654
+ <li id="archives-2" class="widget-container widget_archive"><h3 class="widget-title">Archives</h3> <ul>
655
+ <li><a href='http://javascriptweblog.wordpress.com/2011/04/' title='April 2011'>April 2011</a></li>
656
+ <li><a href='http://javascriptweblog.wordpress.com/2011/02/' title='February 2011'>February 2011</a></li>
657
+ <li><a href='http://javascriptweblog.wordpress.com/2011/01/' title='January 2011'>January 2011</a></li>
658
+ <li><a href='http://javascriptweblog.wordpress.com/2010/12/' title='December 2010'>December 2010</a></li>
659
+ <li><a href='http://javascriptweblog.wordpress.com/2010/11/' title='November 2010'>November 2010</a></li>
660
+ <li><a href='http://javascriptweblog.wordpress.com/2010/10/' title='October 2010'>October 2010</a></li>
661
+ <li><a href='http://javascriptweblog.wordpress.com/2010/09/' title='September 2010'>September 2010</a></li>
662
+ <li><a href='http://javascriptweblog.wordpress.com/2010/08/' title='August 2010'>August 2010</a></li>
663
+ <li><a href='http://javascriptweblog.wordpress.com/2010/07/' title='July 2010'>July 2010</a></li>
664
+ <li><a href='http://javascriptweblog.wordpress.com/2010/06/' title='June 2010'>June 2010</a></li>
665
+ <li><a href='http://javascriptweblog.wordpress.com/2010/05/' title='May 2010'>May 2010</a></li>
666
+ <li><a href='http://javascriptweblog.wordpress.com/2010/04/' title='April 2010'>April 2010</a></li>
667
+ <li><a href='http://javascriptweblog.wordpress.com/2010/03/' title='March 2010'>March 2010</a></li>
668
+ </ul>
669
+ </li><li id="text-7" class="widget-container widget_text"> <div class="textwidget"><a href="http://feedjit.com/ir1/36a838868ab6245b84eef90cd00c1327/"><img src="http://feedjit.com/b/36a838868ab6245b84eef90cd00c1327.png" alt="" border="0" style="width:1px;height:1px;" /></a></div>
670
+ </li><li id="text-13" class="widget-container widget_text"> <div class="textwidget"></div>
671
+ </li> </ul>
672
+ </div><!-- #primary .widget-area -->
673
+
674
+
675
+ </div><!-- #content-box -->
676
+
677
+ <div id="footer" role="contentinfo">
678
+
679
+
680
+ <div id="colophon">
681
+ Theme: <a href="http://theme.wordpress.com/themes/coraline/">Coraline</a> by <a href="http://automattic.com/">Automattic</a> <span class="generator-link"><a href="http://wordpress.com/?ref=footer" rel="generator">Blog at WordPress.com</a>.</span>
682
+ </div><!-- #colophon -->
683
+ </div><!-- #footer -->
684
+
685
+ </div><!-- #container -->
686
+
687
+ <script type="text/javascript">
688
+ // <![CDATA[
689
+ (function() {
690
+ try{
691
+ if ( window.external &&'msIsSiteMode' in window.external) {
692
+ if (window.external.msIsSiteMode()) {
693
+ var jl = document.createElement('script');
694
+ jl.type='text/javascript';
695
+ jl.async=true;
696
+ jl.src='/wp-content/plugins/ie-sitemode/custom-jumplist.php';
697
+ var s = document.getElementsByTagName('script')[0];
698
+ s.parentNode.insertBefore(jl, s);
699
+ }
700
+ }
701
+ }catch(e){}
702
+ })();
703
+ // ]]>
704
+ </script> <script type="text/javascript">
705
+ /* <![CDATA[ */
706
+ function pressthis(step) {if (step == 1) {if(navigator.userAgent.indexOf('Safari') >= 0) {Q=getSelection();}else {if(window.getSelection)Q=window.getSelection().toString();else if(document.selection)Q=document.selection.createRange().text;else Q=document.getSelection().toString();}} else {location.href='http://lbrisbo.wordpress.com/wp-admin/post-new.php?text='+encodeURIComponent(Q.toString())+'&amp;popupurl='+encodeURIComponent(location.href)+'&amp;popuptitle='+encodeURIComponent(document.title);}}
707
+ function toggle_query_list() { var querylist = document.getElementById( 'querylist' );if( querylist.style.display == 'block' ) {querylist.style.display='none';} else {querylist.style.display='block';}}
708
+
709
+ jQuery( function() {
710
+ (function(jq){jq.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=jq.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){jq(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}if(p==this){return false;}var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;jq(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{jq(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);
711
+ ;(function(jq){jq.fn.superfish=function(op){var sf=jq.fn.superfish,c=sf.c,jqarrow=jq([''].join('')),over=function(){var jqjq=jq(this),menu=getMenu(jqjq);clearTimeout(menu.sfTimer);jqjq.showSuperfishUl().siblings().hideSuperfishUl();},out=function(){var jqjq=jq(this),menu=getMenu(jqjq),o=sf.op;clearTimeout(menu.sfTimer);menu.sfTimer=setTimeout(function(){o.retainPath=(jq.inArray(jqjq[0],o.jqpath)>-1);jqjq.hideSuperfishUl();if(o.jqpath.length&&jqjq.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.jqpath);}},o.delay);},getMenu=function(jqmenu){var menu=jqmenu.parents(['ul.',c.menuClass,':first'].join(''))[0];sf.op=sf.o[menu.serial];return menu;},addArrow=function(jqa){jqa.addClass(c.anchorClass).append(jqarrow.clone());};return this.each(function(){var s=this.serial=sf.o.length;var o=jq.extend({},sf.defaults,op);o.jqpath=jq('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){jq(this).addClass([o.hoverClass,c.bcClass].join(' ')).filter('li:has(ul)').removeClass(o.pathClass);});sf.o[s]=sf.op=o;jq('li:has(ul)',this)[(jq.fn.hoverIntent&&!o.disableHI)?'hoverIntent':'hover'](over,out).each(function(){if(o.autoArrows)addArrow(jq('>a:first-child',this));}).not('.'+c.bcClass).hideSuperfishUl();var jqa=jq('a',this);jqa.each(function(i){var jqli=jqa.eq(i).parents('li');jqa.eq(i).focus(function(){over.call(jqli);}).blur(function(){out.call(jqli);});});o.onInit.call(this);}).each(function(){var menuClasses=[c.menuClass];if(sf.op.dropShadows&&!(jq.browser.msie&&jq.browser.version<7))menuClasses.push(c.shadowClass);jq(this).addClass(menuClasses.join(' '));});};var sf=jq.fn.superfish;sf.o=[];sf.op={};sf.IE7fix=function(){var o=sf.op;if(jq.browser.msie&&jq.browser.version>6&&o.dropShadows&&o.animation.opacity!=undefined) this.toggleClass(sf.c.shadowClass+'-off');};sf.c={bcClass:'sf-breadcrumb',menuClass:'sf-js-enabled',anchorClass:'sf-with-ul',arrowClass:'sf-sub-indicator',shadowClass:'sf-shadow'};sf.defaults={hoverClass:'sfHover',pathClass:'overideThisToUse',pathLevels:1,delay:600,animation:{opacity:'show'},speed:100,autoArrows:false,dropShadows:false,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};jq.fn.extend({hideSuperfishUl:function(){var o=sf.op,not=(o.retainPath===true)?o.jqpath:'';o.retainPath=false;var jqul=jq(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass).find('>ul').hide().css('visibility','hidden');o.onHide.call(jqul);return this;},showSuperfishUl:function(){var o=sf.op,sh=sf.c.shadowClass+'-off',jqul=this.addClass(o.hoverClass).find('>ul:hidden').css('visibility','visible');sf.IE7fix.call(jqul);o.onBeforeShow.call(jqul);jqul.animate(o.animation,o.speed,function(){sf.IE7fix.call(jqul);o.onShow.call(jqul);});return this;}});})(jQuery);
712
+
713
+ if ( jQuery(this).width() < 1100 ) jQuery("#adminbarsearch").hide();
714
+
715
+ jQuery( '#wpcombar li.ab-my-account, #wpcombar li.ab-bloginfo' ).mouseover( function() {
716
+ if ( jQuery(this).hasClass( 'ab-my-account' ) ) jQuery('#wpcombar li.ab-me > a').addClass('hover');
717
+ if ( jQuery(this).hasClass( 'ab-bloginfo' ) ) jQuery('#wpcombar li.ab-blog > a').addClass('hover');
718
+ });
719
+
720
+ jQuery( '#wpcombar li.ab-my-account, #wpcombar li.ab-bloginfo' ).mouseout( function() {
721
+ if ( jQuery(this).hasClass( 'ab-my-account' ) ) jQuery('#wpcombar li.ab-me > a').removeClass('hover');
722
+ if ( jQuery(this).hasClass( 'ab-bloginfo' ) ) jQuery('#wpcombar li.ab-blog > a').removeClass('hover');
723
+ });
724
+
725
+ jQuery(window).resize( function() {
726
+ if ( jQuery(this).width() < 1100 )
727
+ jQuery("#adminbarsearch").hide();
728
+
729
+ if ( jQuery(this).width() > 1100 )
730
+ jQuery("#adminbarsearch").show();
731
+ });
732
+
733
+ jQuery( '#wpcombar ul ul li a' ).mouseover( function() {
734
+ var root = jQuery(this).parents('div.quicklinks ul > li');
735
+ var par = jQuery(this).parent();
736
+ var children = par.children('ul');
737
+ if ( root.hasClass('ab-sadmin') )
738
+ jQuery(children[0]).css('right',par.parents('ul').width() - 1 +'px' );
739
+ else
740
+ jQuery(children[0]).css('left',par.parents('ul').width() +'px' );
741
+
742
+ jQuery(children[0]).css('top', '0' );
743
+ });
744
+
745
+ if ( window.location.hash ) window.scrollBy(0,-32);
746
+
747
+ });
748
+
749
+ jQuery( function() {
750
+ jQuery('#wpcombar').appendTo('body');
751
+ jQuery("#wpcombar ul").superfish();
752
+ });
753
+
754
+ /* ]]> */
755
+ </script> <script type="text/javascript">
756
+ /* <![CDATA[ */
757
+ jQuery( function() {
758
+ jQuery('#wpcombar li.ab-wpl-like > a, #wpl-button > a.like').click( function() {
759
+ var link = jQuery(this);
760
+ var count = 0;
761
+
762
+ if ( link.parent().hasClass('liked') )
763
+ return true;
764
+
765
+ jQuery('#wpl-likebox #wpl-count').fadeOut(150);
766
+
767
+ jQuery('#wpl-likebox #wpl-button a').fadeOut(150, function() {
768
+ jQuery('#wpl-likebox #wpl-button a').removeClass('like');
769
+ jQuery('#wpl-likebox #wpl-button a, #wpl-likebox #wpl-button').addClass('liked');
770
+
771
+ if ( 'Be the first to like this post.' == jQuery('#wpl-likebox #wpl-count').html() )
772
+ jQuery('#wpl-likebox #wpl-count').html('You like this post.');
773
+ else if ( 'One blogger likes this post.' == jQuery('#wpl-likebox #wpl-count').html() ) {
774
+ count = 1;
775
+ jQuery('#wpl-likebox #wpl-count').html('You and one other blogger like this post.');
776
+ } else {
777
+ count = jQuery('#wpl-likebox #wpl-count span').html();
778
+ jQuery('#wpl-likebox #wpl-count').html('You and ' + count + ' other bloggers like this post.');
779
+ }
780
+
781
+ if ( !jQuery('#wpl-likebox #wpl-avatars').length ) {
782
+ jQuery('#wpl-likebox #wpl-count').after('<div id="wpl-avatars"><a title="Lauren B." href="http://gravatar.com/lbrisbo"><img src="http://gravatar.com/avatar/523cd3ccd404b03b9804508635d5e6f8?s=30&amp;d=wavatar" alt="My Grav" width="30" height="30" /></a></div>').hide();
783
+ jQuery('#wpl-likebox #wpl-avatars a:first').hide().fadeIn(850);
784
+ } else {
785
+ jQuery('#wpl-likebox #wpl-avatars').prepend('<a href="http://gravatar.com/lbrisbo"><img src="http://gravatar.com/avatar/523cd3ccd404b03b9804508635d5e6f8?s=30&amp;d=wavatar" alt="My Grav" width="30" height="30" style="padding-right: 3px;" /></a>');
786
+ jQuery('#wpl-likebox #wpl-avatars a:first').hide();
787
+ }
788
+
789
+ jQuery('#wpl-likebox #wpl-count').fadeIn(150);
790
+ jQuery('#wpl-likebox #wpl-button a').html('You like this').fadeIn(150, function() {
791
+ jQuery('#wpl-likebox #wpl-avatars a:first').fadeIn(550);
792
+ });
793
+
794
+ var timeout = 0;
795
+ if ( link.parent().hasClass('ab-wpl-like') ) {
796
+ timeout = 1200;
797
+ jQuery('#wpcombar li.ab-wpl-like a').addClass('loading');
798
+ }
799
+
800
+ setTimeout( function() {
801
+ jQuery('#wpcombar li.ab-wpl-like').removeClass('like').addClass('liked menupop').append( '<ul><li><a href="http://wordpress.com/quickpress/?reblog=12490669,1133">Reblog this post</a></li><li><a href="http://wordpress.com/#likes">View all posts I like</a></li></ul>');
802
+ jQuery('#wpcombar li.ab-wpl-like > a').removeClass('loading').html('<span>You like this (' + (count*1 + 1) + ')</span>');
803
+ jQuery('#wpcombar li.ab-wpl-like ul').hide();
804
+
805
+ if ( link.parent().hasClass('ab-wpl-like') ) {
806
+ jQuery('#wpcombar li.ab-wpl-like ul').slideDown( 200, function() {
807
+ setTimeout ( function() {
808
+ jQuery('#wpcombar li.ab-wpl-like ul').slideUp(200);
809
+ }, 5000 );
810
+ });
811
+ }
812
+ }, timeout );
813
+ });
814
+
815
+ var nonce = link.attr('href').split('_wpnonce=');
816
+ nonce = nonce[1];
817
+
818
+ jQuery.post( 'http://javascriptweblog.wordpress.com/wp-admin/admin-ajax.php', {
819
+ 'action': 'like_it',
820
+ 'cookie': encodeURIComponent(document.cookie),
821
+ '_wpnonce': nonce,
822
+ 'blog_id': 12490669,
823
+ 'post_id': 1133 },
824
+ function(response) {});
825
+ return false;
826
+ });
827
+ });
828
+ /* ]]> */
829
+ </script>
830
+ <script type="text/javascript">_qoptions={qacct:'p-18-mFEk4J448M',labels:'language.en,type.wpcom,wp.loggedin,posttag.executioncontext,posttag.property-variable,posttag.this'};</script>
831
+ <script type="text/javascript" src="http://edge.quantserve.com/quant.js"></script>
832
+ <noscript><p><img class="robots-nocontent" src="http://pixel.quantserve.com/pixel/p-18-mFEk4J448M.gif?labels=language.en%2Ctype.wpcom%2Cwp.loggedin%2Cposttag.executioncontext%2Cposttag.property-variable%2Cposttag.this" style="display:none" height="1" width="1" alt="" /></p></noscript>
833
+ <script type="text/javascript">
834
+ /* <![CDATA[ */
835
+ jQuery(document).ready( function() {
836
+ jQuery('#wpcombar .ab-subscribe > a').live( 'click', function() {
837
+ return false;
838
+ });
839
+
840
+ jQuery('#wpcombar .ab-subscribe-to-blog a').live( 'click', function() {
841
+ var link = jQuery(this);
842
+ var parent_li = link.parents('li.ab-subscribe');
843
+ var parent_a = parent_li.children('a:first');
844
+
845
+ if ( parent_li.hasClass('subscribed') ) return false;
846
+ link.html('Subscribing...');
847
+ parent_a.addClass('loading');
848
+
849
+ setTimeout( function() {
850
+ parent_a.removeClass('loading');
851
+ parent_li.addClass('subscribed');
852
+ parent_a.children('span').prepend('<strong>[x]</strong>');
853
+ parent_a.children('strong').hide().fadeIn(200);
854
+ link.parent().removeClass('ab-subscribe-to-blog');
855
+ link.parent().addClass('ab-unsubscribe-from-blog');
856
+ link.html('Unsubscribe from Blog');
857
+ }, 750 );
858
+
859
+ var nonce = link.attr('href').split('_wpnonce=');
860
+ nonce = nonce[1];
861
+
862
+ jQuery.post( 'http://javascriptweblog.wordpress.com/wp-admin/admin-ajax.php', {
863
+ 'action': 'ab_subscribe_to_blog',
864
+ 'cookie': encodeURIComponent(document.cookie),
865
+ '_wpnonce': nonce,
866
+ 'blog_url': 'javascriptweblog.wordpress.com'
867
+ },
868
+ function(response) {});
869
+
870
+ return false;
871
+ });
872
+
873
+ jQuery('#wpcombar .ab-unsubscribe-from-blog a').live( 'click', function() {
874
+ var link = jQuery(this);
875
+ var parent_li = link.parents('li.ab-subscribe');
876
+ var parent_a = parent_li.children('a:first');
877
+
878
+ link.html('Unsubscribing...');
879
+ jQuery('li.ab-subscribe a span strong').remove();
880
+ parent_a.addClass('loading');
881
+
882
+ setTimeout( function() {
883
+ parent_a.removeClass('loading');
884
+ parent_li.removeClass('subscribed');
885
+ link.parent().removeClass('subscribed');
886
+ link.removeClass('subscribed');
887
+ link.parent().removeClass('ab-unsubscribe-from-blog');
888
+ link.parent().addClass('ab-subscribe-to-blog');
889
+ link.html('Subscribe to Blog');
890
+ }, 750 );
891
+
892
+ var nonce = link.attr('href').split('_wpnonce=');
893
+ nonce = nonce[1];
894
+
895
+ jQuery.post( 'http://javascriptweblog.wordpress.com/wp-admin/admin-ajax.php', {
896
+ 'action': 'ab_unsubscribe_from_blog',
897
+ 'cookie': encodeURIComponent(document.cookie),
898
+ '_wpnonce': nonce,
899
+ 'blog_url': 'javascriptweblog.wordpress.com'
900
+ },
901
+ function(response) {});
902
+
903
+ return false;
904
+ });
905
+ });
906
+ /* ]]> */
907
+ </script>
908
+ <script type='text/javascript' src='http://s.gravatar.com/js/gprofiles.js?u&#038;ver=MU'></script>
909
+ <script type='text/javascript'>
910
+ /* <![CDATA[ */
911
+ var WPGroHo = {
912
+ my_hash: "523cd3ccd404b03b9804508635d5e6f8"
913
+ };
914
+ /* ]]> */
915
+ </script>
916
+ <script type='text/javascript' src='http://s1.wp.com/wp-content/mu-plugins/gravatar-hovercards/wpgroho.js?m=1300122931g&amp;ver=MU'></script>
917
+ <div style="display:none">
918
+ <div class="grofile-hash-map-882f228c4993ccf0a86e96394636415c">
919
+ </div>
920
+ <div class="grofile-hash-map-d8eb53574a39b25e6b89a7282deb9f74">
921
+ </div>
922
+ <div class="grofile-hash-map-97981f97e272edf03f5612f4aba40239">
923
+ </div>
924
+ <div class="grofile-hash-map-6766096e8ae81ad6b3b82b9c12be19e0">
925
+ </div>
926
+ <div class="grofile-hash-map-a46583ba1465935557efcde3822752d1">
927
+ </div>
928
+ <div class="grofile-hash-map-f1fcf834ddad415f60d29c87cc10d4d4">
929
+ </div>
930
+ <div class="grofile-hash-map-eb2fd4fc5dd468c43ae4506769428c22">
931
+ </div>
932
+ <div class="grofile-hash-map-848810b47f0470175b1f8ac2234d936f">
933
+ </div>
934
+ </div>
935
+ <script type='text/javascript' src='http://s2.wp.com/wp-content/mu-plugins/sharing/sharing.js?m=1302515500g&amp;ver=0.2'></script>
936
+ <script type="text/javascript" src="http://b.scorecardresearch.com/beacon.js"></script><script type="text/javascript">try{COMSCORE.beacon({c1:2,c2:7518284});}catch(e){}</script><noscript><p class="robots-nocontent"><img src="http://b.scorecardresearch.com/p?cj=1c1=2&#038;c2=7518284" alt="" style="display:none" width="1" height="1" /></p></noscript><script type='text/javascript' src='http://s1.wp.com/wp-content/plugins/syntaxhighlighter/syntaxhighlighter/scripts/shCore.js?m=1300122932g&#038;ver=2.1.364b'></script>
937
+ <script type='text/javascript' src='http://s2.wp.com/wp-content/plugins/syntaxhighlighter/syntaxhighlighter/scripts/shBrushJScript.js?m=1300122932g&#038;ver=2.1.364b'></script>
938
+ <script type='text/javascript'>
939
+ (function(){
940
+ var corecss = document.createElement('link');
941
+ var themecss = document.createElement('link');
942
+ var themecssurl = "http://s0.wp.com/wp-content/plugins/syntaxhighlighter-wpcom/shThemeDefault.css?m=1300122931g&amp;ver=2.1.364b";
943
+ if ( themecss.setAttribute ) {
944
+ themecss.setAttribute( "rel", "stylesheet" );
945
+ themecss.setAttribute( "type", "text/css" );
946
+ themecss.setAttribute( "href", themecssurl );
947
+ } else {
948
+ themecss.rel = "stylesheet";
949
+ themecss.href = themecssurl;
950
+ }
951
+ document.getElementsByTagName("head")[0].appendChild(themecss);
952
+ })();
953
+ SyntaxHighlighter.config.clipboardSwf = 'http://s2.wp.com/wp-content/plugins/syntaxhighlighter/syntaxhighlighter/scripts/clipboard.swf?m=1300122932g';
954
+ SyntaxHighlighter.config.strings.expandSource = 'show source';
955
+ SyntaxHighlighter.config.strings.viewSource = 'view source';
956
+ SyntaxHighlighter.config.strings.copyToClipboard = 'copy to clipboard';
957
+ SyntaxHighlighter.config.strings.copyToClipboardConfirmation = 'The code is in your clipboard now';
958
+ SyntaxHighlighter.config.strings.print = 'print';
959
+ SyntaxHighlighter.config.strings.help = '?';
960
+ SyntaxHighlighter.config.strings.alert = 'SyntaxHighlighter\n\n';
961
+ SyntaxHighlighter.config.strings.noBrush = 'Can\'t find brush for: ';
962
+ SyntaxHighlighter.config.strings.brushNotHtmlScript = 'Brush wasn\'t configured for html-script option: ';
963
+ SyntaxHighlighter.all();
964
+ </script>
965
+ <script src="http://s.stats.wordpress.com/w.js?19" type="text/javascript"></script>
966
+ <script type="text/javascript">
967
+ st_go({'blog':'12490669','v':'wpcom','user_id':'13702221','post':'1133','subd':'javascriptweblog'});
968
+ ex_go({'crypt':'UE40eW5QN0p8M2Y/RE1zNDZ8S252Wis9XUQyb3YrcUVIU2R0VH5TcUpqcF9NWi1bMDJfX2JqPURyYlJKfEZXM01ibk5SYyVfNyYtVnh1VmZZbXNuRSwtW2VQcW43RFhtUXBiOVB3K2UmPWtkRUhJSzJqXUJMblNEb0ZiT19IUGFCUDFWQzIzbTZ3a1JkJWo/bDcsTnFCNFVvMXgwVklMLGlHOE9lTkhVQ1lWLHxDZC5wOVVoMmRKXS91REdmcEtYMnVuRlo1el90JUdKeUMyR3JjaFBnT1F+KzNLbA=='});
969
+ re_go({'d[javascriptweblog.wordpress.com]':'2','v':'sph','b':'12490669','p':'1133'});
970
+ addLoadEvent(function(){linktracker_init('12490669',1133);});
971
+ </script>
972
+
973
+ <script type="text/javascript">
974
+ /* <![CDATA[ */
975
+ jQuery(document).ready(function() {
976
+ jQuery( "#global-search" ).click( function() {
977
+ jQuery( "#adminbarsearch" ).attr( "action", "http://en.search.wordpress.com" );
978
+ jQuery("#publicsearchform").attr("target", "");
979
+ if ( jQuery(".onsearch").length == 0 )
980
+ jQuery( "#adminbarsearch" ).attr( "target", "_blank" );
981
+ jQuery( "#adminbarsearch" ).submit();
982
+ });
983
+
984
+ jQuery("#private-local-search").click( function() {
985
+ jQuery( "#q" ).attr( "name", "s" );
986
+ jQuery( "#adminbarsearch" ).attr( "action", "/" );
987
+ jQuery( "#adminbarsearch" ).attr( "target", "" );
988
+ jQuery( "#adminbarsearch" ).submit();
989
+ });
990
+
991
+ jQuery("#public-local-search").click( function() {
992
+ if ( jQuery("#publicsearchform").length==0 ){
993
+ jQuery("#adminbarsearch-publicform").append("<form id='publicsearchform'></form>");
994
+ jQuery("#publicsearchform").append("<input type='hidden' id='newq' name='q' />");
995
+ }
996
+ jQuery("#publicsearchform").attr("target", "_blank");
997
+ jQuery("#publicsearchform").attr("action", "http://en.search.wordpress.com");
998
+ jQuery("#newq").val("site:javascriptweblog.wordpress.com "+jQuery("#q").val());
999
+ jQuery("#publicsearchform").submit();
1000
+ });
1001
+
1002
+ jQuery("#adminbarsearch #q").keypress(function(event){
1003
+ if ( event.keyCode == '13' ) {
1004
+ event.preventDefault();
1005
+ if ( jQuery("#private-local-search").length == 0 && jQuery("#public-local-search").length == 0 )
1006
+ jQuery("#global-search").click();
1007
+ else
1008
+ jQuery(".localsearch").click();
1009
+ }
1010
+ });
1011
+ });
1012
+ /* ]]> */
1013
+ </script>
1014
+ <div id="wpcombar" class="snap_nopreview no-grav">
1015
+ <div class="quicklinks">
1016
+ <ul>
1017
+
1018
+ <li class="ab-me">
1019
+ <a href="http://lbrisbo.wordpress.com/wp-admin/profile.php"><img alt='' src='http://1.gravatar.com/avatar/523cd3ccd404b03b9804508635d5e6f8?s=16&amp;d=monsterid&amp;r=G' class='avatar avatar-16' height='16' width='16' /></a>
1020
+
1021
+
1022
+ </li>
1023
+ <li class="menupop ab-my-account">
1024
+ <a href="http://lbrisbo.wordpress.com/wp-admin/profile.php"><span>My Account</span></a>
1025
+
1026
+ <ul>
1027
+
1028
+ <li class="ab-new-quickpress-post">
1029
+ <a href="http://wordpress.com/quickpress/">New QuickPress Post</a>
1030
+
1031
+
1032
+ </li>
1033
+ <li class="ab-edit-my-profile">
1034
+ <a href="http://lbrisbo.wordpress.com/wp-admin/profile.php">Edit My Profile</a>
1035
+
1036
+
1037
+ </li>
1038
+ <li class="ab-read-freshly-pressed">
1039
+ <a href="http://wordpress.com/fresh/">Read Freshly Pressed</a>
1040
+
1041
+
1042
+ </li>
1043
+ <li class="ab-read-posts-i-like">
1044
+ <a href="http://wordpress.com/likes/">Read Posts I Like</a>
1045
+
1046
+
1047
+ </li>
1048
+ <li class="ab-read-my-subscriptions">
1049
+ <a href="http://wordpress.com/#subs">Read My Subscriptions</a>
1050
+
1051
+
1052
+ </li>
1053
+ <li class="ab-manage-my-subscriptions">
1054
+ <a href="http://wordpress.com/#subs&amp;p=subscriptions.manage.blogs">Manage My Subscriptions</a>
1055
+
1056
+
1057
+ </li>
1058
+ <li class="ab-track-my-comments">
1059
+ <a href="http://lbrisbo.wordpress.com/wp-admin/index.php?page=my-comments">Track My Comments</a>
1060
+
1061
+
1062
+ </li>
1063
+ <li class="ab-global-dashboard">
1064
+ <a href="http://dashboard.wordpress.com/wp-admin/">Global Dashboard</a>
1065
+
1066
+
1067
+ </li>
1068
+ <li class="ab-get-support">
1069
+ <a href="http://en.support.wordpress.com/">Get Support</a>
1070
+
1071
+
1072
+ </li>
1073
+ <li class="ab-log-out">
1074
+ <a href="http://wordpress.com/wp-login.php?action=logout&amp;redirect_to=http%3A%2F%2Fwordpress.com%2F">Log Out</a>
1075
+
1076
+
1077
+ </li> </ul>
1078
+
1079
+ </li>
1080
+ <li class="menupop ab-my-blogs">
1081
+ <a href="http://lbrisbo.wordpress.com/"><span>My Blog</span></a>
1082
+
1083
+ <ul>
1084
+
1085
+ <li class="ab-blog-1-d">
1086
+ <a href="http://lbrisbo.wordpress.com/wp-admin/">Dashboard</a>
1087
+
1088
+
1089
+ </li>
1090
+ <li class="ab-blog-1-n">
1091
+ <a href="http://lbrisbo.wordpress.com/wp-admin/post-new.php">New Post</a>
1092
+
1093
+
1094
+ </li>
1095
+ <li class="ab-blog-1-s">
1096
+ <a href="http://lbrisbo.wordpress.com/wp-admin/index.php?page=stats">Site Stats</a>
1097
+
1098
+
1099
+ </li>
1100
+ <li class="ab-blog-1-c">
1101
+ <a href="http://lbrisbo.wordpress.com/wp-admin/edit-comments.php">Manage Comments</a>
1102
+
1103
+
1104
+ </li>
1105
+ <li class="ab-blog-1-v">
1106
+ <a href="http://lbrisbo.wordpress.com/">Read Blog</a>
1107
+
1108
+
1109
+ </li>
1110
+ <li class="ab-register-a-new-blog">
1111
+ <a href="http://en.wordpress.com/signup/?ref=adminbar">Register a New Blog</a>
1112
+
1113
+
1114
+ </li> </ul>
1115
+
1116
+ </li>
1117
+ <li class="ab-blog">
1118
+ <a href="http://javascriptweblog.wordpress.com"><img class="avatar" src="http://s2.wp.com/i/wpmini-blue.png?m=1300122927g" alt="Current blog avatar" width="16" height="16" /></a>
1119
+
1120
+
1121
+ </li>
1122
+ <li class="menupop ab-bloginfo">
1123
+ <a href=""><span>Blog Info</span></a>
1124
+
1125
+ <ul>
1126
+
1127
+ <li class="ab-random-post">
1128
+ <a href="/?random">Random Post</a>
1129
+
1130
+
1131
+ </li>
1132
+ <li class="ab-get-shortlink">
1133
+ <a href="" onclick="javascript:function wpcomshort() { var url=document.location;var links=document.getElementsByTagName(&#39;link&#39;);var found=0;for(var i = 0, l; l = links[i]; i++){if(l.getAttribute(&#39;rel&#39;)==&#39;shortlink&#39;) {found=l.getAttribute(&#39;href&#39;);break;}}if (!found) {for (var i = 0; l = document.links[i]; i++) {if (l.getAttribute(&#39;rel&#39;) == &#39;shortlink&#39;) {found = l.getAttribute(&#39;href&#39;);break;}}}if (found) {prompt(&#39;URL:&#39;, found);} else {alert(&#39;No shortlink available for this page&#39;); } return false; } wpcomshort();">Get Shortlink</a>
1134
+
1135
+
1136
+ </li>
1137
+ <li class="ab-report-as-spam">
1138
+ <a href="http://wordpress.com/report-spam/?url=javascriptweblog.wordpress.com">Report as spam</a>
1139
+
1140
+
1141
+ </li>
1142
+ <li class="ab-report-as-mature">
1143
+ <a href="http://wordpress.com/report-mature/?url=javascriptweblog.wordpress.com">Report as mature</a>
1144
+
1145
+
1146
+ </li>
1147
+ <li class="ab-theme-coraline">
1148
+ <a href="http://theme.wordpress.com/themes/coraline/">Theme: Coraline</a>
1149
+
1150
+
1151
+ </li> </ul>
1152
+
1153
+ </li>
1154
+ <li class="menupop ab-subscribe">
1155
+ <a href="http://wordpress.com/subs?b=12490669&amp;_wpnonce=e29c1b9805"><span>Subscribe</span></a>
1156
+
1157
+ <ul>
1158
+
1159
+ <li class="ab-subscribe-to-blog">
1160
+ <a href="http://wordpress.com/subs?b=12490669&amp;_wpnonce=e29c1b9805">Subscribe to Blog</a>
1161
+
1162
+
1163
+ </li> </ul>
1164
+
1165
+ </li>
1166
+ <li class="ab-wpl-like like">
1167
+ <a href="http://javascriptweblog.wordpress.com/2010/08/30/understanding-javascripts-this/?like=1&amp;_wpnonce=36b6bac185">Like</a>
1168
+
1169
+
1170
+ </li> </ul>
1171
+ </div>
1172
+ <div id='adminbarsearch-wrap'>
1173
+ <div id="adminbarsearch-publicform"></div>
1174
+ <form id='adminbarsearch' name='adminbarsearch'>
1175
+ <input class='adminbar-input' name='q' id='q' type='text' value='Search WordPress.com' maxlength='150' onfocus='this.value=(this.value=="Search WordPress.com") ? "" : this.value;' onblur='this.value=(this.value=="") ? "Search WordPress.com" : this.value;' />
1176
+ <button type='button' id="public-local-search" class='adminbar-button localsearch'><span>This Site</span></button>
1177
+ <button type='button' id="global-search" class='adminbar-button'><span>All Sites</span></button>
1178
+ </form>
1179
+ </div>
1180
+ </div>
1181
+
1182
+ </body>
1183
+ </html>