<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Pure-Essence.Net &#187; jQuery</title>
	<atom:link href="http://pure-essence.net/tag/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://pure-essence.net</link>
	<description>You have to visit this geeky girl&#039;s blog.</description>
	<lastBuildDate>Wed, 23 May 2012 01:27:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='pure-essence.net' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Pure-Essence.Net &#187; jQuery</title>
		<link>http://pure-essence.net</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://pure-essence.net/osd.xml" title="Pure-Essence.Net" />
	<atom:link rel='hub' href='http://pure-essence.net/?pushpress=hub'/>
		<item>
		<title>jQuery read only elements</title>
		<link>http://pure-essence.net/2011/09/22/jquery-read-only-elements/</link>
		<comments>http://pure-essence.net/2011/09/22/jquery-read-only-elements/#comments</comments>
		<pubDate>Thu, 22 Sep 2011 00:47:40 +0000</pubDate>
		<dc:creator>pureessence</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[non php code]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[readonly]]></category>

		<guid isPermaLink="false">http://pure-essence.net/?p=2171</guid>
		<description><![CDATA[There is a business requirement on a project I have at work to only allow a certain number of properties editable at a certain stage of the domain object&#8217;s life cycle. And like always, the properties defined to be editable could change in the future. I already have a page that allows the user to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&#038;blog=23194870&#038;post=2171&#038;subd=pe20110517&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There is a business requirement on a project I have at work to only allow a certain number of properties editable at a certain stage of the domain object&#8217;s life cycle. <b>And like always, the properties defined to be editable could change in the future.<b></p>
<p>I already have a page that allows the user to edit all properties of the domain object, I really do not wish to duplicate that code. Please note that if you set an input element on a form as <b>disabled</b>, the value associated with the element will <b>NOT be submitted via form post</b>, that certainly is NOT what I&#8217;m looking for. I want the values of the *read only* fields still be submitted by the form but I just don&#8217;t want the user to edit the values. So I looked into using the readonly attribute in HTML. <a href="http://stackoverflow.com/questions/155291/can-html-checkboxes-be-set-to-readonly" target="_blank">It&#8217;s complete crap</a>. </p>
<p>For <a href="http://www.faqs.org/docs/htmltut/forms/_INPUT_DISABLED.html">faqs.org</a>:</p>
<blockquote><p>It&#8217;s important to understand that READONLY merely prevents the user from changing the value of the field, not from interacting with the field. In checkboxes, for example, you can check them on or off (thus setting the CHECKED state) but you don&#8217;t change the value of the field.</p></blockquote>
<p>Basically it works half-hearted and most browsers (IE, FF) do not indicate (by default) that a field is readonly. So the users will probably be left wondering why they cannot edit the field.</p>
<p>I searched around for an alternative and found <a href="http://plugins.jquery.com/project/readonly" target="_blank">this wonderful jQuery plugin readonly</a>. Even though I couldn&#8217;t get it to work right for my application, the idea behind it is genius. You basically put overlay layers on top of any input fields you wish to make read only. The plugin seems a bit outdated. Perhaps it doesn&#8217;t work well with the newer version of jQuery but the idea still works well. Therefore I implemented my own.</p>
<p>This implementation automatically makes all input fields read only unless the input field has the class <b>excludeMeFromReadOnly</b>. This is just my implementation for demonstration. I do not provide any support for this code. Use where you see fit.</p>
<p><b>CSS</b><br />
<pre class="brush: css; wrap-lines: false;">
.readOnlyOverlay {
	position: absolute;
	background-color: #666;
	opacity: 0.3;
	filter: alpha(opacity=30);
	padding: 0pt !IMPORTANT;
	margin: 0pt !IMPORTANT;
}
</pre></p>
<p><b>javascript function generateOverlay</b><br />
<pre class="brush: jscript; wrap-lines: false;">
function generateOverlay(element) {
	var dimension = getDimensions($(element));
	//console.log('top=' + dimension.top + ' left=' + dimension.left +' width='+ dimension.width + ' height=' + dimension.height);

	// disassociate corresponding label attributes so the value of the element cannot be changed by clicking on the labels
	var id = $(element).attr('id');
	var label = $('label[for=&quot;'+id+'&quot;]');
	$(label).removeAttr('for');
	
	// set my tabindex to -1 so tabs will ignore me
	$(element).attr('tabIndex', -1);
	$(label).attr('tabIndex', -1);

	// create a div overlay
	var overlay = $('&lt;div class=&quot;readOnlyOverlay&quot;&gt;&amp;nbsp;&lt;/div&gt;').appendTo('body');
	$(overlay).css('top', dimension.top).css('left', dimension.left).css('width', dimension.width).css('height', dimension.height);
}
</pre></p>
<p><b>javascript function getDimensions</b><br />
<pre class="brush: jscript; wrap-lines: false;">
function getDimensions(element){
	var ret = {};

	// The multiple acquisitions of the CSS styles are required to cover any border and padding the elements may have.
	// The Ternary (parseInt(...) || 0) statements fix a bug in IE6 where it returns NaN,
	//  which doesn't play nicely when adding to numbers...
	ret.width = $(element).width() 
	  + (parseInt($(element).css('borderLeftWidth')) || 0)
	  + (parseInt($(element).css('borderRightWidth')) || 0)
	  + (parseInt($(element).css('padding-left')) || 0)
	  + (parseInt($(element).css('padding-right')) || 0);
	ret.height = $(element).height() 
	  + (parseInt($(element).css('borderTopWidth')) || 0) 
	  + (parseInt($(element).css('borderBottomWidth')) || 0)
	  + (parseInt($(element).css('padding-bottom')) || 0)
	  + (parseInt($(element).css('padding-bottom')) || 0);
	var offsets = $(element).offset();
	ret.left = offsets.left;
	ret.top = offsets.top;

	return ret;
}
</pre></p>
<p><b>jQuery selector</b><br />
<pre class="brush: jscript; wrap-lines: false;">
// select all input,select elements. I'd wrap my form in a div.
$('div#formContent input, div#formContent select, div#formContent textarea').each(function(i, element) {
	// if the element doesn't have the class named excludeMeFromReadOnly, overlay it to make it look like it's read only
	if(!$(element).hasClass('excludeMeFromReadOnly')) {
		generateOverlay($(element));
	}
});
</pre></p>
<p>Please note, the plugin contains a lot more logic including IE hacks etc. Fortunately for me, I really don&#8217;t care about IE prior to version 8 in my particular scenario. Therefore I don&#8217;t need all of those hacks.</p>
<p><b>&#8212;&gt;<a href="http://regretless.com/stuff/jQuery/readOnlyOverlay.html" target="_blank">Example code</a> (<a href="http://jsfiddle.net/dodozhang21/dVGNV/" target="_blank">example at jsFiddle</a>)&lt;&#8212;</b></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pe20110517.wordpress.com/2171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pe20110517.wordpress.com/2171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pe20110517.wordpress.com/2171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pe20110517.wordpress.com/2171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pe20110517.wordpress.com/2171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pe20110517.wordpress.com/2171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pe20110517.wordpress.com/2171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pe20110517.wordpress.com/2171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pe20110517.wordpress.com/2171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pe20110517.wordpress.com/2171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pe20110517.wordpress.com/2171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pe20110517.wordpress.com/2171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pe20110517.wordpress.com/2171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pe20110517.wordpress.com/2171/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&#038;blog=23194870&#038;post=2171&#038;subd=pe20110517&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pure-essence.net/2011/09/22/jquery-read-only-elements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fcfd5e14ca9c91790e95dfdb1d2ad756?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pureessence</media:title>
		</media:content>
	</item>
		<item>
		<title>jQuery.each vs Javascript for loop</title>
		<link>http://pure-essence.net/2011/09/02/jquery-each-vs-javascript-for-loop/</link>
		<comments>http://pure-essence.net/2011/09/02/jquery-each-vs-javascript-for-loop/#comments</comments>
		<pubDate>Fri, 02 Sep 2011 21:31:15 +0000</pubDate>
		<dc:creator>pureessence</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[for loop]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://pure-essence.net/?p=2164</guid>
		<description><![CDATA[Being a big jQuery fan, I use jQuery.each method a lot in my Javascript code. Until recently I didn&#8217;t think too hard what jQuery.each really is. Its description says it&#8217;s an iterator but it certainly is NOT a true iterator. For example: Let me know what you expect the code below to return. Before I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&#038;blog=23194870&#038;post=2164&#038;subd=pe20110517&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Being a big jQuery fan, I use jQuery.each method a lot in my Javascript code. Until recently I didn&#8217;t think too hard what jQuery.each really is.</p>
<p><a href="http://api.jquery.com/jQuery.each/">Its description</a> says it&#8217;s an iterator but it certainly is NOT a true iterator.</p>
<p>For example:</p>
<p>Let me know what you expect the code below to return.</p>
<p><pre class="brush: jscript; wrap-lines: false;">
var myVars = ['foo1', 'foo2', 'foo3'];

function containsValue(myValue, myCollection) {
	jQuery.each(myCollection, function(i, val) {
		if(val == myValue) {
			return true;
		}
	});
	return false;
}

$(document).ready(function() {
	console.log(containsValue('foo2', myVars));
});
</pre></p>
<p>Before I know better, I&#8217;d expect it to return true. Since myCollection DOES CONTAIN the value &#8216;foo2&#8242;. However the function <b>containsValue WILL ALWAYS RETURN FALSE</b>. That&#8217;s because when you return out of jQuery.each, it simply exits out of jQuery.each but not the containing function. In fact, whether you do anything in the callback function at all, jQuery.each ALWAYS RETURNS the collection you pass in.</p>
<p>e.g.<br />
<pre class="brush: jscript; wrap-lines: false;">
var returnedVar = jQuery.each(myVars, function(i, val) {});
console.log(returnedVar === myVars); // evaluates to true
</pre></p>
<p>In my opinion, jQuery.each acts more like a closure than an iterator. Sure you may use it as an iterator as long as you not returning anything. If you are just changing behaviors or collecting information, it will mimic an iterator. But you need to know, it really is not an iterator.</p>
<p>Personally I&#8217;m going to start to use <a href="http://www.w3schools.com/js/js_loop_for_in.asp" target="_blank">Javascript&#8217;s native for..in statement</a> instead of jQuery.each for Javascript collection variables. There is also an argument that jQuery.each may never perform faster than the native support for an iterator. Therefore below I will rewrite the function above using for..in.</p>
<p><pre class="brush: jscript; wrap-lines: false;">
function containsValueWithFor(myValue, myCollection) {
	for (index in myCollection) {
		if(myCollection[index] == myValue) {
			return true;
		}
	}
	return false;
}

console.log(containsValueWithFor('foo2', myVars)); // true

var myMap = {'lala':'foo1', '2':'foo2', 'b':'foo3'};

console.log(containsValueWithFor('foo2', myMap)); // true as well for an object/map
</pre></p>
<p><b>&#8212;&gt;<a href="http://regretless.com/stuff/jQuery/jQueryEach.html" target="_blank">Example code</a>&lt;&#8212;</b></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pe20110517.wordpress.com/2164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pe20110517.wordpress.com/2164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pe20110517.wordpress.com/2164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pe20110517.wordpress.com/2164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pe20110517.wordpress.com/2164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pe20110517.wordpress.com/2164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pe20110517.wordpress.com/2164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pe20110517.wordpress.com/2164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pe20110517.wordpress.com/2164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pe20110517.wordpress.com/2164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pe20110517.wordpress.com/2164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pe20110517.wordpress.com/2164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pe20110517.wordpress.com/2164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pe20110517.wordpress.com/2164/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&#038;blog=23194870&#038;post=2164&#038;subd=pe20110517&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pure-essence.net/2011/09/02/jquery-each-vs-javascript-for-loop/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fcfd5e14ca9c91790e95dfdb1d2ad756?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pureessence</media:title>
		</media:content>
	</item>
		<item>
		<title>QUnit &#8211; test your javascript</title>
		<link>http://pure-essence.net/2011/07/24/qunit-test-your-javascript/</link>
		<comments>http://pure-essence.net/2011/07/24/qunit-test-your-javascript/#comments</comments>
		<pubDate>Sun, 24 Jul 2011 16:28:06 +0000</pubDate>
		<dc:creator>pureessence</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[non php code]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[qunit]]></category>
		<category><![CDATA[unit test]]></category>

		<guid isPermaLink="false">http://pure-essence.net/?p=2139</guid>
		<description><![CDATA[After over ten years of javascript programming, I&#8217;m finally seriously considering writing at least unit tests for my javascript. Since I&#8217;m such a big fan of jQuery, QUnit seems like the obvious choice. It&#8217;s sad but better late than never. The truth is, in my opinion, the fact that javascript test frameworks do not yet [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&#038;blog=23194870&#038;post=2139&#038;subd=pe20110517&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After over ten years of javascript programming, I&#8217;m finally seriously considering writing at least unit tests for my javascript. Since I&#8217;m such a big fan of jQuery, <a href="http://docs.jquery.com/QUnit">QUnit</a> seems like the obvious choice.</p>
<p>It&#8217;s sad but better late than never.</p>
<p>The truth is, in my opinion, the fact that javascript test frameworks do not yet maturely work with many of the continuous integration software deters programmers from using them. What&#8217;s the point of unit testing if they don&#8217;t automatically get run? Based on my research, <a href="http://www.jsunit.net/" target="_blank">JSUnit</a> is the only one that integrates with ANT innately. But JSUnit is more of an abandomware now so people are looking for alternatives.</p>
<p><strong>QUnit + CI topics</strong></p>
<ul>
<li>
<a href="http://lostechies.com/joshuaflanagan/2008/09/18/running-jquery-qunit-tests-under-continuous-integration/" target="_blank">jQuery tests under CI</a>
</li>
<li>
<a href="http://jupiterjs.com/#news/syn-a-standalone-synthetic-event-library" target="_blank">Syn instead of Selenium?</a>
</li>
<li>
<a href="http://docs.jquery.com/Qunit#Integration_into_Browser_Automation_Tools" target="_blank">QUnit and automated browser tools</a>
</li>
</ul>
<p>&gt;&gt; <a href="http://regretless.com/stuff/qunit/testSuite.html" target="_blank">Run my test suite</a> &lt;&lt;</p>
<p><strong>QUnit simple example:</strong></p>
<p>HTML:<br />
<pre class="brush: xml; wrap-lines: false;">
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
	&lt;title&gt;Test Suite&lt;/title&gt;
	&lt;script src=&quot;http://code.jquery.com/jquery-latest.js&quot;&gt;&lt;/script&gt;
	&lt;link rel=&quot;stylesheet&quot; href=&quot;http://code.jquery.com/qunit/git/qunit.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&gt;
	&lt;script type=&quot;text/javascript&quot; src=&quot;http://code.jquery.com/qunit/git/qunit.js&quot;&gt;&lt;/script&gt;
	&lt;!-- Your source files go here --&gt;
	&lt;script type=&quot;text/javascript&quot; src=&quot;functions.js&quot;&gt;&lt;/script&gt;

	&lt;!-- Your tests files go here --&gt;
	&lt;script type=&quot;text/javascript&quot; src=&quot;isEvenTest.js&quot;&gt;&lt;/script&gt;
	&lt;script type=&quot;text/javascript&quot; src=&quot;startsWithTest.js&quot;&gt;&lt;/script&gt;

&lt;/head&gt;
&lt;body&gt;
	&lt;h1 id=&quot;qunit-header&quot;&gt;QUnit example&lt;/h1&gt;
	&lt;h2 id=&quot;qunit-banner&quot;&gt;&lt;/h2&gt;
	&lt;div id=&quot;qunit-testrunner-toolbar&quot;&gt;&lt;/div&gt;
	&lt;h2 id=&quot;qunit-userAgent&quot;&gt;&lt;/h2&gt;
	&lt;ol id=&quot;qunit-tests&quot;&gt;&lt;/ol&gt;

	&lt;!-- Any HTML you may require for your tests to work properly --&gt;
	&lt;div id=&quot;qunit-fixture&quot;&gt;test markup, will be hidden&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre></p>
<p>Source javascript file:<br />
<pre class="brush: jscript; wrap-lines: false;">
function isEven(val) {
	return val % 2 === 0;
}

function startsWith(data, startsWithStr) {
	data = jQuery.trim(data);
	startsWithStr = jQuery.trim(startsWithStr);
	if(data) {
		return data.toUpperCase().lastIndexOf(startsWithStr.toUpperCase(), 0) === 0;
	} else if(data === startsWithStr) {
		return true;
	} else {
		return false;
	}
}
</pre></p>
<p>Sample test file:<br />
<pre class="brush: jscript; wrap-lines: false;">
$(document).ready(function(){

	module(&quot;startsWithTest&quot;);

	test('startsWith', function() { 
		ok(startsWith(&quot;ll-925&quot;, &quot;ll-&quot;), 'Starts with ll-'); 
		ok(!startsWith(&quot;ll-925&quot;, &quot;xl-&quot;), 'Does not start with xl-'); 
		ok(!startsWith(&quot;&quot;, &quot;xx-&quot;), 'Does not start with xx-'); 
		ok(startsWith(&quot; xx-sdgj &quot;, &quot;xx-&quot;), 'Trimming test: starts with xx-'); 
		ok(startsWith(&quot; xx-sdgj&quot;, &quot; xx- &quot;), 'Trimming test 2: starts with xx-'); 
		ok(startsWith(&quot;&quot;, &quot; &quot;), 'Empty string starts with empty string'); 
		ok(startsWith(&quot;Mn-u59&quot;, &quot;mN-&quot;), 'Non case sensitive test'); 
//		raises(startsWith(foo, &quot; &quot;), 'Undefined test 1');  // undefined is obviously not considered a normal exception
	}) 

});
</pre></p>
<p>&gt;&gt; <a href="https://github.com/dodozhang21/QUnit-Example" target="_blank">git repo for the source</a> &lt;&lt;</p>
<p><strong>Additional resources:</strong></p>
<ul>
<li><a href="http://net.tutsplus.com/tutorials/javascript-ajax/how-to-test-your-javascript-code-with-qunit/" target="_blank">QUnit tutorials</a></li>
<li><a href="http://docs.jquery.com/QUnit#API_documentation" target="_blank">API documentation</a></li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pe20110517.wordpress.com/2139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pe20110517.wordpress.com/2139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pe20110517.wordpress.com/2139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pe20110517.wordpress.com/2139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pe20110517.wordpress.com/2139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pe20110517.wordpress.com/2139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pe20110517.wordpress.com/2139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pe20110517.wordpress.com/2139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pe20110517.wordpress.com/2139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pe20110517.wordpress.com/2139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pe20110517.wordpress.com/2139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pe20110517.wordpress.com/2139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pe20110517.wordpress.com/2139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pe20110517.wordpress.com/2139/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&#038;blog=23194870&#038;post=2139&#038;subd=pe20110517&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pure-essence.net/2011/07/24/qunit-test-your-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fcfd5e14ca9c91790e95dfdb1d2ad756?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pureessence</media:title>
		</media:content>
	</item>
		<item>
		<title>jQuery UI even though you disappointed me, I still figured you out</title>
		<link>http://pure-essence.net/2011/06/06/jquery-ui-you-disappoint-me/</link>
		<comments>http://pure-essence.net/2011/06/06/jquery-ui-you-disappoint-me/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 22:01:11 +0000</pubDate>
		<dc:creator>pureessence</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[rants]]></category>
		<category><![CDATA[autocomplete]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jquery ui]]></category>

		<guid isPermaLink="false">http://pure-essence.net/?p=2062</guid>
		<description><![CDATA[So I upgraded to jQuery UI version 1.8.2 at work and thought that I should instead of using the autocomplete plugin which is deprecated, switch over to use the jQuery UI build-in autocomplete widget. jQuery UI autocomplete widget is NOTHING like the original jQuery autocomplete plugin!!! At least by jQuery UI version 1.8.2 it&#8217;s not. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&#038;blog=23194870&#038;post=2062&#038;subd=pe20110517&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So I upgraded to jQuery UI version 1.8.2 at work and thought that I should instead of using <a href="http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/">the autocomplete plugin</a> which is deprecated, switch over to use <a href="http://docs.jquery.com/Plugins/autocomplete">the jQuery UI build-in autocomplete widget</a>. </p>
<p><strong>jQuery UI autocomplete widget is NOTHING like the original jQuery autocomplete plugin!!!</strong></p>
<p>At least by jQuery UI version 1.8.2 it&#8217;s not.</p>
<p>The jQuery UI autocomplete widget is crap just like I remembered when it first came out.</p>
<p><strong>Things I found that annoyed the heck out of me:</strong></p>
<ul>
<li>Highlight doesn&#8217;t work. <a href="http://stackoverflow.com/questions/3695184/jquery-autocomplete-highlighting">Use this hack instead</a>.</li>
<li>Must match doesn&#8217;t work. <a href="http://stackoverflow.com/questions/2587378/how-to-implement-mustmatch-and-selectfirst-in-jquery-ui-autocomplete">More info available here</a>.<br />
I ended up using a separate javascript function I wrote.<br />
<pre class="brush: jscript; wrap-lines: false;">
function jQueryUIAutoCompleteMustMatch(input) {
	var found = 0;
	
	var matcher = new RegExp( &quot;^&quot; + $.ui.autocomplete.escapeRegex( jQuery.trim($(input).val()) ) + &quot;$&quot;, &quot;i&quot; );
	
	jQuery.each($('.ui-autocomplete li'), function(i, val) {
		if(jQuery.trim( $(val).text() ).match( matcher ) ) {
			found = 1;
		}
	});
	
	if (found) {
		return true;
	} else {
		$(input).val('');
		return false;
	}
}
</pre></p>
<p>inside of your autocomplete setup, do</p>
<p><pre class="brush: jscript; wrap-lines: false;">
change: function(event, ui) {jQueryUIAutoCompleteMustMatch($(this));}
</pre></p>
</li>
<li>
To mimic the scrollHeight property on the autocomplete plugin, you will need to use css overrides. <a href="http://forum.jquery.com/topic/autocomplete-scrollheight-missing" target="_blank">More info here</a> (<a href="http://jqueryui.com/demos/autocomplete/maxheight.html" target="_blank">Example</a>).<br />
<pre class="brush: css; wrap-lines: false;">
.ui-autocomplete {
	max-height: 220px;
	overflow-y: auto;
	/* prevent horizontal scrollbar */
	overflow-x: hidden;
	/* add padding to account for vertical scrollbar */
	padding-right: 20px;
}
/* IE 6 doesn't support max-height
 * we use height instead, but this forces the menu to always be this tall
 */
* html .ui-autocomplete {
	height: 220px;
}
</pre></p>
</li>
<li>
To mimic the behavior of the option formatResult in the original plugin, you may do something like:<br />
<pre class="brush: jscript; wrap-lines: false;">
$( &quot;#tags&quot; ).autocomplete({
	source: availableTags,
	minLength: 0,
	delay: 0,
	close: function(event, ui) {
		var numberOnly = $(this).val().match(/\d+/);
		$(this).val(numberOnly);
	}
})
;
</pre><br />
Above is to format the result as number only.</p>
<li>
If you want the pop up search results as soon as the user has the focus on the input without entering anything, you will need to bind the search call on the focus event of the input. <a href="http://stackoverflow.com/questions/4604216/jquery-ui-autocomplete-minlength0-issue" target="_blank">More info here</a>.<br />
I ended up with<br />
<pre class="brush: jscript; wrap-lines: false;">
$(input).autocomplete({
		source: list
	})
	.focus(function() {
		$(this).autocomplete(&quot;search&quot;);
	})
	;
</pre>
</li>
<li>I finally recognized that the jQuery UI autocomplete widget has far fewer options you may set. For example, by version 1.8.2, below are the only options
<ul>
<li>disabled</li>
<li>appendTo</li>
<li>autoFocus</li>
<li>delay</li>
<li>minLength</li>
<li>position</li>
<li>source</li>
</ul>
<p>If you wish to get your autocomplete working the same as your old one, chances are you will need to add a lot more additional code/hack.
</li>
</ul>
<p>This is the biggest disappointment for me since I started using <a href="http://jquery.com">jQuery</a>.</p>
<p>&gt;&gt;&gt; <b><a href="http://regretless.com/work/jQuery/autocompleteWidgetConfigured.html" target="_blank">My Example with everything configured the way I want</a></b> &lt;&lt;&lt;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pe20110517.wordpress.com/2062/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pe20110517.wordpress.com/2062/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pe20110517.wordpress.com/2062/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pe20110517.wordpress.com/2062/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pe20110517.wordpress.com/2062/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pe20110517.wordpress.com/2062/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pe20110517.wordpress.com/2062/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pe20110517.wordpress.com/2062/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pe20110517.wordpress.com/2062/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pe20110517.wordpress.com/2062/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pe20110517.wordpress.com/2062/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pe20110517.wordpress.com/2062/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pe20110517.wordpress.com/2062/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pe20110517.wordpress.com/2062/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&#038;blog=23194870&#038;post=2062&#038;subd=pe20110517&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pure-essence.net/2011/06/06/jquery-ui-you-disappoint-me/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fcfd5e14ca9c91790e95dfdb1d2ad756?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pureessence</media:title>
		</media:content>
	</item>
		<item>
		<title>Use modal windows for delete confirmations please</title>
		<link>http://pure-essence.net/2011/03/01/use-modal-windows-for-delete-confirmations-please/</link>
		<comments>http://pure-essence.net/2011/03/01/use-modal-windows-for-delete-confirmations-please/#comments</comments>
		<pubDate>Tue, 01 Mar 2011 21:00:15 +0000</pubDate>
		<dc:creator>pureessence</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[non php code]]></category>
		<category><![CDATA[delete confirmation]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQueryUI]]></category>
		<category><![CDATA[modal window]]></category>

		<guid isPermaLink="false">http://pe20110517.wordpress.com/?p=1778</guid>
		<description><![CDATA[While reviewing an existing project at work, I notice it has many delete confirmation pages. In my opinion, delete confirmation PAGES should really just retire from the face of the earth. Seriously, why do we need to create a http request &#38; html for the mere purpose of asking &#8220;Are you sure you wish to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&#038;blog=23194870&#038;post=1778&#038;subd=pe20110517&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>While reviewing an existing project at work, I notice it has many delete confirmation pages. In my opinion, delete confirmation PAGES should really just retire from the face of the earth. Seriously, why do we need to create a http request &amp; html for the mere purpose of asking</p>
<p>&#8220;Are you sure you wish to delete blah?&#8221;</p>
<p>Yes, I&#8217;m sure | No, go back</p>
<p>Often the URLs for delete confirmation pages are consisted of</p>
<p>some.host/someApplication/deleteConfirmation?toDelete=<b>some+description</b>&amp;id=<b>some+id</b></p>
<p>Delete confirmation should be an UI client side behavior to prevent the user from accidentally clicking on a delete link/button and forcing a backend change to the data that was not intended.</p>
<p><img src="http://regretless.com/stuff/jQuery/jQueryDeleteConfirmation.png" /></p>
<p><b>Preconditions</b></p>
<p>The delete actions are hyperlinks. There are many examples with delete actions as form submissions. My example expects the delete actions to be links such as <b>delete.php?id=#</b>. I believe this is a more challenging situation than a form submission. I will share my solution. I think ideally it will be nice for <a href="http://jqueryui.com/demos/dialog/">the jQuery UI dialog</a> to return a boolean javascript variable but since it currently does not (and I&#8217;m not sure it ever will), I&#8217;m using window.location to load the delete action link. </p>
<p><a href="http://regretless.com/stuff/jQuery/deleteConfirmationNoJs.html"><span style="font-size:1.5em;">View the example of the page without any jQuery</span></a></p>
<p>Please have some general knowledge regarding <a href="http://api.jquery.com/category/selectors/">jQuery selectors</a>. I will not go into details how that works.</p>
<p>Assume you have a way of using jQuery selectors to uniquely bind an onclick event to each delete link. For simplicity purpose, in my example, all of my delete links will have the css class <b>deleteConfirmation</b>.</p>
<p><b>jQuery UI example of a delete confirmation modal window</b><br />
I will be using links from <a href="http://code.google.com/apis/libraries/devguide.html">Google CDN</a> in my example.</p>
<p><b>Step 1</b><br />
Create a div with an unique id in your html markup. It doesn&#8217;t matter where it exists in your markup, it just need to exist. We will create the jQuery UI dialog off it.<br />
<pre class="brush: xml; wrap-lines: false;">
&lt;div id=&quot;jQueryDeleteConfirmationModalWindow&quot;&gt;&lt;/div&gt;
</pre></p>
<p><b>Step 2</b><br />
When the DOM is loaded, create your jQuery UI dialog and have its autoOpen property set to false. This allows us to reuse this dialog for all delete confirmations.<br />
<pre class="brush: jscript; wrap-lines: false;">
// create the jQuery modal window and set autoOpen to false
$(&quot;#jQueryDeleteConfirmationModalWindow&quot;).dialog({
	title: &quot;Delete Confirmation&quot;,
	autoOpen: false,	// set this to false so we can manually open it
	dialogClass: &quot;jQueryDeleteConfirmationModalWindow&quot;,
	closeOnEscape: false,
	draggable: false,
	width: 460,
	height: 260,
	modal: true,
	buttons: {
			&quot;Yes, I'm sure&quot;: function() {
				$( this ).dialog( &quot;close&quot; );
			},
			Cancel: function() {
				$( this ).dialog( &quot;close&quot; );
			}
		},
	resizable: false,
	open: function() {
		// scrollbar fix for IE
		$('body').css('overflow','hidden');
	},
	close: function() {
		// reset overflow
		$('body').css('overflow','auto');
	}
}); // end of dialog
</pre></p>
<p><b>Step 3</b><br />
Bind the onclick events to the delete action links via the css class <b>deleteConfirmation</b>.<br />
<pre class="brush: jscript; wrap-lines: false;">
$('a.deleteConfirmation').click(function() {
	var name = $(this).parent().parent().children('td.name').html(); // a.delete -&gt; td -&gt; tr -&gt; td.name
	name = jQuery.trim(name);
	$(&quot;#jQueryDeleteConfirmationModalWindow&quot;).html('Are you sure you wish to delete ' + name + '?');
	$(&quot;#jQueryDeleteConfirmationModalWindow&quot;).dialog('open');
	return false;
});
</pre><br />
Notice I also made it so my confirmation message will contain an unique description via the inner html property of another table cell of the same table row?</p>
<p><b>Step 4</b><br />
If the user clicks on &#8220;Yes, I&#8217;m sure&#8221;, we want to execute the delete action. Therefore, my solution is to create a global variable that contains the value of the hyperlink the user clicked on and then set it to the window.location if the &#8220;Yes, I&#8217;m sure&#8221; is clicked on the modal window.</p>
<p>As the first line inside of the script tag, add<br />
<pre class="brush: jscript; wrap-lines: false;">
var deleteTheSelectedUrl = '';
</pre></p>
<p>In the button &#8220;Yes, I&#8217;m sure&#8221;, after dialog close, add</p>
<p><pre class="brush: jscript; wrap-lines: false;">
if('' != jQuery.trim(deleteTheSelectedUrl)) {
	window.location = deleteTheSelectedUrl;
}
</pre></p>
<p>In the onclick event binding, add as the first line</p>
<p><pre class="brush: jscript; wrap-lines: false;">
deleteTheSelectedUrl = $(this).attr('href');
</pre></p>
<p><a href="http://regretless.com/stuff/jQuery/deleteConfirmation.html"><span style="font-size:1.5em;">View the final example</span></a></p>
<p><a href="https://github.com/dodozhang21/jQuery-delete-confirmation">github repo</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pe20110517.wordpress.com/1778/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pe20110517.wordpress.com/1778/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pe20110517.wordpress.com/1778/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pe20110517.wordpress.com/1778/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pe20110517.wordpress.com/1778/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pe20110517.wordpress.com/1778/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pe20110517.wordpress.com/1778/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pe20110517.wordpress.com/1778/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pe20110517.wordpress.com/1778/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pe20110517.wordpress.com/1778/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pe20110517.wordpress.com/1778/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pe20110517.wordpress.com/1778/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pe20110517.wordpress.com/1778/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pe20110517.wordpress.com/1778/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&#038;blog=23194870&#038;post=1778&#038;subd=pe20110517&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pure-essence.net/2011/03/01/use-modal-windows-for-delete-confirmations-please/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fcfd5e14ca9c91790e95dfdb1d2ad756?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pureessence</media:title>
		</media:content>

		<media:content url="http://regretless.com/stuff/jQuery/jQueryDeleteConfirmation.png" medium="image" />
	</item>
		<item>
		<title>writing an ajax app for Sequence</title>
		<link>http://pure-essence.net/2010/08/02/writing-an-ajax-app-for-sequence/</link>
		<comments>http://pure-essence.net/2010/08/02/writing-an-ajax-app-for-sequence/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 12:44:43 +0000</pubDate>
		<dc:creator>pureessence</dc:creator>
				<category><![CDATA[games]]></category>
		<category><![CDATA[geeky]]></category>
		<category><![CDATA[php code]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sequence]]></category>

		<guid isPermaLink="false">http://regretless.com/?p=1674</guid>
		<description><![CDATA[Yesterday I attended Ted Neward&#8216;s game design session at nofluff. It inspired me to begin to implement the game sequence in an ajax app. It will be a private app since I only plan to play it with some friends. But it will be hosted somewhere on my website so it can be accessed from [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&#038;blog=23194870&#038;post=1674&#038;subd=pe20110517&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Yesterday I attended <a href="http://www.nofluffjuststuff.com/conference/speaker/ted_neward">Ted Neward</a>&#8216;s game design session at <a href="http://www.nofluffjuststuff.com/">nofluff</a>. It inspired me to begin to implement the game sequence in an ajax app. It will be a private app since I only plan to play it with some friends. But it will be hosted somewhere on my website so it can be accessed from anywhere.</p>
<p>Sequence is a board game my husband and I often played with two of our friends. It&#8217;s their favorite game. When I started thinking last night about potentially creating a web version so we don&#8217;t need to be physically at their house to play, I became very excited. I believe I may create something that will work with the help of php, mysql + jQuery (ajax).</p>
<p><strong>Why this idea excites me</strong></p>
<ul>
<li>Before I started as a professional Java developer, I always coded in php &amp; mysql (somewhat a LAMP developer on the side). However most of my old applications and sites are down. I no longer have the desire to maintain them. Now this is a great opportunity and incentive for me to go back to php &amp; mysql and write something I enjoy.</li>
<li>PHP has a special place in my heart. Just a while ago, a coworker asked for my help to create him something to help with the manual text file processing he has to do every month. It only needs to be quick &amp; dirty app. I threw together a php app in half an hour for him. It was super cool. He loved it.</li>
<li>jQuery is my favorite javascript library. You don&#8217;t have to look far in my blog to find that out. So the more I get to work with it, the happier I am.</li>
<li>I can also involve my husband on this project. Even though he&#8217;s not a programmer but he knows this game as well as I do. Normally he doesn&#8217;t have much of stake in my apps but this time he can be my lab rat <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li>With this project, I also get to play with UI. I started as a web designer. So CSS &amp; HTML have been my passion. There will be quite a bit of UI involved in the designing of this game.</li>
<li>It&#8217;s fun because it will be very useful. I very much look forward to the day that I can have our friends joining the game.</li>
<li>I can blog about it! I may not share my final product with the public but I will definitely share my progress &amp; experience. Hopefully there will be challenges where I can learn some new stuff.</li>
</ul>
<p>Last night I started brainstorming with my hushand as how I want the game to work. I started table designing and UI designing. This morning I put together a very prototype version of the UI.<br />
<a class="thickbox" href="http://pe20110517.files.wordpress.com/2011/05/phase001.png" title="sequence phase 001"><img src="http://pe20110517.files.wordpress.com/2011/05/phase001.png?w=480" alt="sequence phase 001" class="blogpic" style="width:50%;" /></a><br />
I leveraged jQuery&#8217;s &#8220;redmond&#8221; theme. This way I can use all of the cool <a href="http://jqueryui.com">jQuery UI</a> widgets and benefit from reusing its css for elements I want to style and create a semi prof looking app in no time.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pe20110517.wordpress.com/1674/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pe20110517.wordpress.com/1674/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pe20110517.wordpress.com/1674/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pe20110517.wordpress.com/1674/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pe20110517.wordpress.com/1674/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pe20110517.wordpress.com/1674/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pe20110517.wordpress.com/1674/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pe20110517.wordpress.com/1674/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pe20110517.wordpress.com/1674/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pe20110517.wordpress.com/1674/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pe20110517.wordpress.com/1674/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pe20110517.wordpress.com/1674/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pe20110517.wordpress.com/1674/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pe20110517.wordpress.com/1674/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&#038;blog=23194870&#038;post=1674&#038;subd=pe20110517&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pure-essence.net/2010/08/02/writing-an-ajax-app-for-sequence/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fcfd5e14ca9c91790e95dfdb1d2ad756?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pureessence</media:title>
		</media:content>

		<media:content url="http://pe20110517.files.wordpress.com/2011/05/phase001.png" medium="image">
			<media:title type="html">sequence phase 001</media:title>
		</media:content>
	</item>
		<item>
		<title>jQuery session timeout countdown with jQueryUI dialog</title>
		<link>http://pure-essence.net/2010/02/14/jquery-session-timeout-countdown/</link>
		<comments>http://pure-essence.net/2010/02/14/jquery-session-timeout-countdown/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 14:24:16 +0000</pubDate>
		<dc:creator>pureessence</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[non php code]]></category>
		<category><![CDATA[countdown]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[session]]></category>
		<category><![CDATA[timeout]]></category>

		<guid isPermaLink="false">http://regretless.com/?p=1604</guid>
		<description><![CDATA[Very nice jQuery session timeout countdown example with the use of the jQuery idleTimer plugin. Here&#8217;s my example with the jQueryUI dialog as the warning. Here&#8217;s my example with the jQueryUI dialog as the warning.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&#038;blog=23194870&#038;post=1604&#038;subd=pe20110517&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Very nice <a href="http://www.erichynds.com/jquery/creating-a-mint-com-style-idle-logout-timer-using-jquery/">jQuery session timeout countdown example</a> with the use of the <a href="http://paulirish.com/2009/jquery-idletimer-plugin/">jQuery idleTimer plugin</a>.</p>
<p><a href="http://regretless.com/stuff/jQuery/jQuerySessionTimeoutCountdownWithDialog.html">Here&#8217;s my example with the jQueryUI dialog as the warning</a>.</p>
<p><pre class="brush: jscript; wrap-lines: false;">
var idleTime = 2000; // number of miliseconds until the user is considered idle
var initialSessionTimeoutMessage = 'Your session will expire in &lt;span id=&quot;sessionTimeoutCountdown&quot;&gt;&lt;/span&gt; seconds.&lt;br /&gt;&lt;br /&gt;Click on &lt;b&gt;OK&lt;/b&gt; to continue your session.';
var sessionTimeoutCountdownId = 'sessionTimeoutCountdown';
var redirectAfter = 10; // number of seconds to wait before redirecting the user
var redirectTo = ' http://regretless.com/2010/02/14/jquery-session-timeout-countdown/'; // URL to relocate the user to once they have timed out
var keepAliveURL = 'keepAlive.php'; // URL to call to keep the session alive
var expiredMessage = 'Your session has expired.  You are being logged out for security reasons.'; // message to show user when the countdown reaches 0
var running = false; // var to check if the countdown is running
var timer; // reference to the setInterval timer so it can be stopped
$(document).ready(function() {
	// create the warning window and set autoOpen to false
	var sessionTimeoutWarningDialog = $(&quot;#sessionTimeoutWarning&quot;);
	$(sessionTimeoutWarningDialog).html(initialSessionTimeoutMessage);
	$(sessionTimeoutWarningDialog).dialog({
		title: 'Session Expiration Warning',
		autoOpen: false,	// set this to false so we can manually open it
		closeOnEscape: false,
		draggable: false,
		width: 460,
		minHeight: 50,
		modal: true,
		beforeclose: function() { // bind to beforeclose so if the user clicks on the &quot;X&quot; or escape to close the dialog, it will work too
			// stop the timer
			clearInterval(timer);

			// stop countdown
			running = false;

			// ajax call to keep the server-side session alive
			$.ajax({
			  url: keepAliveURL,
			  async: false
			});
		},
		buttons: {
			OK: function() {
				// close dialog
				$(this).dialog('close');
			}
		},
		resizable: false,
		open: function() {
			// scrollbar fix for IE
			$('body').css('overflow','hidden');
		},
		close: function() {
			// reset overflow
			$('body').css('overflow','auto');
		}
	}); // end of dialog


	// start the idle timer
	$.idleTimer(idleTime);

	// bind to idleTimer's idle.idleTimer event
	$(document).bind(&quot;idle.idleTimer&quot;, function(){
		// if the user is idle and a countdown isn't already running
		if($.data(document,'idleTimer') === 'idle' &amp;amp;&amp;amp; !running){
			var counter = redirectAfter;
			running = true;

			// intialisze timer
			$('#'+sessionTimeoutCountdownId).html(redirectAfter);
			// open dialog
			$(sessionTimeoutWarningDialog).dialog('open');

			// create a timer that runs every second
			timer = setInterval(function(){
				counter -= 1;

				// if the counter is 0, redirect the user
				if(counter === 0) {
					$(sessionTimeoutWarningDialog).html(expiredMessage);
					$(sessionTimeoutWarningDialog).dialog('disable');
					window.location = redirectTo;
				} else {
					$('#'+sessionTimeoutCountdownId).html(counter);
				};
			}, 1000);
		};
	});

});
</pre></p>
<p><a href="http://regretless.com/stuff/jQuery/jQuerySessionTimeoutCountdownWithDialog.html">Here&#8217;s my example with the jQueryUI dialog as the warning</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pe20110517.wordpress.com/1604/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pe20110517.wordpress.com/1604/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pe20110517.wordpress.com/1604/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pe20110517.wordpress.com/1604/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pe20110517.wordpress.com/1604/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pe20110517.wordpress.com/1604/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pe20110517.wordpress.com/1604/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pe20110517.wordpress.com/1604/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pe20110517.wordpress.com/1604/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pe20110517.wordpress.com/1604/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pe20110517.wordpress.com/1604/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pe20110517.wordpress.com/1604/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pe20110517.wordpress.com/1604/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pe20110517.wordpress.com/1604/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&#038;blog=23194870&#038;post=1604&#038;subd=pe20110517&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pure-essence.net/2010/02/14/jquery-session-timeout-countdown/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fcfd5e14ca9c91790e95dfdb1d2ad756?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pureessence</media:title>
		</media:content>
	</item>
		<item>
		<title>Stupid IE does it again</title>
		<link>http://pure-essence.net/2010/02/12/stupid-ie-does-it-again/</link>
		<comments>http://pure-essence.net/2010/02/12/stupid-ie-does-it-again/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 16:42:12 +0000</pubDate>
		<dc:creator>pureessence</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[non php code]]></category>
		<category><![CDATA[event delegation]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[live]]></category>

		<guid isPermaLink="false">http://regretless.com/?p=1602</guid>
		<description><![CDATA[I just learned IE does not support jQuery&#8217;s new live (event delegation) binding on the change event. Very nice IE, you did it again.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&#038;blog=23194870&#038;post=1602&#038;subd=pe20110517&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I just learned IE does not support jQuery&#8217;s new <a href="http://api.jquery.com/live/">live (event delegation) binding</a> on the <strong>change</strong> event.</p>
<p>Very nice IE, <a href="http://www.neeraj.name/blog/articles/882-how-live-method-works-in-jquery-why-it-does-not-work-in-some-cases-when-to-use-livequery">you did it again</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pe20110517.wordpress.com/1602/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pe20110517.wordpress.com/1602/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pe20110517.wordpress.com/1602/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pe20110517.wordpress.com/1602/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pe20110517.wordpress.com/1602/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pe20110517.wordpress.com/1602/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pe20110517.wordpress.com/1602/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pe20110517.wordpress.com/1602/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pe20110517.wordpress.com/1602/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pe20110517.wordpress.com/1602/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pe20110517.wordpress.com/1602/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pe20110517.wordpress.com/1602/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pe20110517.wordpress.com/1602/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pe20110517.wordpress.com/1602/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&#038;blog=23194870&#038;post=1602&#038;subd=pe20110517&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pure-essence.net/2010/02/12/stupid-ie-does-it-again/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fcfd5e14ca9c91790e95dfdb1d2ad756?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pureessence</media:title>
		</media:content>
	</item>
		<item>
		<title>jQueryUI dialog as loading screen (replace blockUI)</title>
		<link>http://pure-essence.net/2010/01/29/jqueryui-dialog-as-loading-screen-replace-blockui/</link>
		<comments>http://pure-essence.net/2010/01/29/jqueryui-dialog-as-loading-screen-replace-blockui/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 19:54:52 +0000</pubDate>
		<dc:creator>pureessence</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[blockUI]]></category>
		<category><![CDATA[dialog]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQueryUI]]></category>
		<category><![CDATA[modal-dialog]]></category>

		<guid isPermaLink="false">http://regretless.com/?p=1579</guid>
		<description><![CDATA[I like being able to manually control my loading screen with my ajax calls. Previously I was using the blockUI jQuery plugin. It&#8217;s a great plugin. You may turn an overlay on your entire screen or just a layer on or off by simply calling and Since at work they are hosting the jQueryUI package, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&#038;blog=23194870&#038;post=1579&#038;subd=pe20110517&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I like being able to manually control my loading screen with my ajax calls. Previously I was using <a href="http://malsup.com/jquery/block/">the blockUI jQuery plugin</a>. It&#8217;s a great plugin. You may turn an overlay on your entire screen or just a layer on or off by simply calling<br />
<pre class="brush: jscript; wrap-lines: false;">
$(selector).block();
</pre></p>
<p>and</p>
<p><pre class="brush: jscript; wrap-lines: false;">
$(selector).unblock();
</pre></p>
<p>Since at work they are hosting the jQueryUI package, I thought it&#8217;s a good idea to use as a few external plugins as possible. So I worked on using the jQueryUI dialog widget as the blockUI plugin. My goal is to replace the $(selector).block() and $(selector).unblock() conveniences. I think I got pretty close.</p>
<p><a href="http://regretless.com/stuff/jQuery/jQueryUIDialogLoadingScreenDemo.html">Click for a jQueryUI dialog as loading screen demonstration</a>.</p>
<p><strong>Step 1:</strong><br />
Create a layer in my html to be used as the loading screen.<br />
<pre class="brush: xml; wrap-lines: false;">
&lt;div id=&quot;loadingScreen&quot;&gt;&lt;/div&gt;
</pre></p>
<p><strong>Step 2:</strong><br />
Style the loading screen with a nice loading icon. Want more customized loading icons? Check out the <a href="http://www.ajaxload.info/">ajax loading icons site</a>.<br />
<pre class="brush: css; wrap-lines: false;">
#loadingScreen {
	background: url(../images/loading.gif) no-repeat 5px 8px;
	padding-left: 25px;
}
</pre></p>
<p><strong>Step 3:</strong><br />
Create a js file so I can include on all of the pages where I need the loading screen.<br />
<pre class="brush: jscript; wrap-lines: false;">
$(document).ready(function() {
	// create the loading window and set autoOpen to false
	$(&quot;#loadingScreen&quot;).dialog({
		autoOpen: false,	// set this to false so we can manually open it
		dialogClass: &quot;loadingScreenWindow&quot;,
		closeOnEscape: false,
		draggable: false,
		width: 460,
		minHeight: 50,
		modal: true,
		buttons: {},
		resizable: false,
		open: function() {
			// scrollbar fix for IE
			$('body').css('overflow','hidden');
		},
		close: function() {
			// reset overflow
			$('body').css('overflow','auto');
		}
	}); // end of dialog
});
function waitingDialog(waiting) { // I choose to allow my loading screen dialog to be customizable, you don't have to
	$(&quot;#loadingScreen&quot;).html(waiting.message &amp;amp;&amp;amp; '' != waiting.message ? waiting.message : 'Please wait...');
	$(&quot;#loadingScreen&quot;).dialog('option', 'title', waiting.title &amp;amp;&amp;amp; '' != waiting.title ? waiting.title : 'Loading');
	$(&quot;#loadingScreen&quot;).dialog('open');
}
function closeWaitingDialog() {
	$(&quot;#loadingScreen&quot;).dialog('close');
}
</pre></p>
<p><strong>Step 4:</strong><br />
It&#8217;s kind of annoying I think that <a href="http://jqueryui.com/demos/dialog/">the dialog widget</a> doesn&#8217;t give you a &#8216;closable&#8217; option. Because I don&#8217;t want my loading screen to be closable, the only way I could figure out to get rid of the little &#8216;X&#8217; on the upper right corner of the title bar is to give your dialog a css class and then hide the &#8216;X&#8217; using the css below:</p>
<p><pre class="brush: css; wrap-lines: false;">
/* hide the close x on the loading screen */
.loadingScreenWindow .ui-dialog-titlebar-close {
	display: none;
}
</pre></p>
<p>Simply show the loading screen by calling</p>
<p><pre class="brush: jscript; wrap-lines: false;">
waitingDialog({});
</pre></p>
<p>or with custom title &amp; message</p>
<p><pre class="brush: jscript; wrap-lines: false;">
waitingDialog({title: &quot;Hi&quot;, message: &quot;I'm loading...&quot;});
</pre></p>
<p>Call</p>
<p><pre class="brush: jscript; wrap-lines: false;">
closeWaitingDialog();
</pre></p>
<p>to hide the loading screen.</p>
<p><a href="http://regretless.com/stuff/jQuery/jQueryUIDialogLoadingScreenDemo.html">Click for a jQueryUI dialog as loading screen demonstration</a>.</p>
<p><b>Ajax Call</b><br />
Someone asked for an example of how to utilize the loading screen in an ajax call.<br />
<pre class="brush: jscript; wrap-lines: false;">
waitingDialog({});
$.ajax({
  url: &quot;testAjax.php&quot;,
  success: function(data){
  $('#data').html(data);
	closeWaitingDialog();
  }
});
</pre></p>
<p><a href="http://regretless.com/stuff/jQuery/jQueryUIDialogLoadingScreenAjaxDemo.html">Click for a jQueryUI dialog as loading screen demonstration with AJAX call</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pe20110517.wordpress.com/1579/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pe20110517.wordpress.com/1579/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pe20110517.wordpress.com/1579/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pe20110517.wordpress.com/1579/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pe20110517.wordpress.com/1579/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pe20110517.wordpress.com/1579/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pe20110517.wordpress.com/1579/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pe20110517.wordpress.com/1579/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pe20110517.wordpress.com/1579/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pe20110517.wordpress.com/1579/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pe20110517.wordpress.com/1579/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pe20110517.wordpress.com/1579/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pe20110517.wordpress.com/1579/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pe20110517.wordpress.com/1579/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&#038;blog=23194870&#038;post=1579&#038;subd=pe20110517&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pure-essence.net/2010/01/29/jqueryui-dialog-as-loading-screen-replace-blockui/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fcfd5e14ca9c91790e95dfdb1d2ad756?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pureessence</media:title>
		</media:content>
	</item>
		<item>
		<title>jQuery selection copy</title>
		<link>http://pure-essence.net/2010/01/22/jquery-selection-copy/</link>
		<comments>http://pure-essence.net/2010/01/22/jquery-selection-copy/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 19:43:46 +0000</pubDate>
		<dc:creator>pureessence</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[change event]]></category>
		<category><![CDATA[dropdown]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[selectedIndex]]></category>
		<category><![CDATA[selection]]></category>
		<category><![CDATA[trigger]]></category>

		<guid isPermaLink="false">http://regretless.com/?p=1577</guid>
		<description><![CDATA[Here&#8217;s a jQuery scenario I encountered today at work. I found the solution interesting. I have 2 identical selection dropdowns. When I select from the first one I want to copy the selection value into the second. However, I also have a change event attached to the second selection dropdown. In order to make sure [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&#038;blog=23194870&#038;post=1577&#038;subd=pe20110517&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a jQuery scenario I encountered today at work. I found the solution interesting.</p>
<p>I have 2 identical selection dropdowns. When I select from the first one I want to copy the selection value into the second. However, I also have a change event attached to the second selection dropdown. In order to make sure I trigger the second dropdown&#8217;s change event, instead of doing:<br />
<pre class="brush: jscript; wrap-lines: false;">
$('#firstSelection').change(function() {
	$('#secondSelection').val($(this).val());
});
</pre></p>
<p>I have to do the following:<br />
<pre class="brush: jscript; wrap-lines: false;">
$('#firstSelection').change(function() {
	var selectedIndex = $(this).attr('selectedIndex');
	$('#secondSelection').attr('selectedIndex', selectedIndex).change();
});
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pe20110517.wordpress.com/1577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pe20110517.wordpress.com/1577/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pe20110517.wordpress.com/1577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pe20110517.wordpress.com/1577/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pe20110517.wordpress.com/1577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pe20110517.wordpress.com/1577/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pe20110517.wordpress.com/1577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pe20110517.wordpress.com/1577/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pe20110517.wordpress.com/1577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pe20110517.wordpress.com/1577/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pe20110517.wordpress.com/1577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pe20110517.wordpress.com/1577/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pe20110517.wordpress.com/1577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pe20110517.wordpress.com/1577/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&#038;blog=23194870&#038;post=1577&#038;subd=pe20110517&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pure-essence.net/2010/01/22/jquery-selection-copy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fcfd5e14ca9c91790e95dfdb1d2ad756?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pureessence</media:title>
		</media:content>
	</item>
	</channel>
</rss>
