<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>digitalize.ca &#187; Web Development</title>
	<atom:link href="http://digitalize.ca/cat/blog/web-development-blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://digitalize.ca</link>
	<description>Owned, operated, and obliterated by Mohammad Jangda</description>
	<lastBuildDate>Tue, 27 Dec 2011 17:17:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-beta3-20574</generator>
		<item>
		<title>JavaScript Countdown Timer</title>
		<link>http://digitalize.ca/2011/02/javascript-countdown-timer/</link>
		<comments>http://digitalize.ca/2011/02/javascript-countdown-timer/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 17:50:22 +0000</pubDate>
		<dc:creator>Mohammad Jangda</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[countdown]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[timer]]></category>

		<guid isPermaLink="false">http://digitalize.ca/?p=1434</guid>
		<description><![CDATA[I was in search of a JavaScript countdown timer (mainly because I&#8217;m too lazy to build it out myself &#8212; and because I&#8217;m sure millions before me have done the same), but Google wasn&#8217;t doing me much good. Most scripts would modify the DOM, directly but not make it easy to programmatically intercept the remaining [...]]]></description>
			<content:encoded><![CDATA[<p>I was in search of a JavaScript countdown timer (mainly because I&#8217;m too lazy to build it out myself &#8212; and because I&#8217;m sure millions before me have done the same), but Google wasn&#8217;t doing me much good. Most scripts would modify the DOM, directly but not make it easy to programmatically intercept the remaining time.</p>
<p>So, I picked <a href="http://www.ricocheting.com/code/javascript/html-generator/countdown-timer">one of the cleanest scripts</a> and cleaned it up a bit. </p>
<p><script src="https://gist.github.com/842737.js?file=jsTimer.js"></script><br />
<noscript></p>
<pre>
/**
 * A sweet js countdown timer with a custom callback that gives you a JSON object!
 * Heavily modified code originally found on <a href="http://www.ricocheting.com/code/javascript/html-generator/countdown-timer" rel="nofollow">http://www.ricocheting.com/code/javascript/html-generator/countdown-timer</a>
 *
 * @param string|Date String representation of when to countdown to. Date objects probably work too
 * @param callback Function triggered when the interval has passed
 * @param int Number of milliseconds for the timeout. Defaults to 1000 (1 second)
 *
 * @return object Returns a JSON object with properties: days, hours, minutes, seconds
 */
timer = function(endDate, callback, interval) {
    endDate = new Date(endDate);
    interval = interval || 1000;

    var currentDate = new Date()
        , millisecondDiff = endDate.getTime() - currentDate.getTime() // get difference in milliseconds
        , timeRemaining = {
            days: 0
            , hours: 0
            , minutes: 0
            , seconds: 0
        }
        ;

    if(millisecondDiff > 0) {
        millisecondDiff = Math.floor( millisecondDiff/1000 ); // kill the "milliseconds" so just secs

		timeRemaining.days = Math.floor( millisecondDiff/86400 ); // days
		millisecondDiff = millisecondDiff % 86400;

		timeRemaining.hours = Math.floor( millisecondDiff/3600 ); // hours
		millisecondDiff = millisecondDiff % 3600;

		timeRemaining.minutes = Math.floor( millisecondDiff/60 ); // minutes
		millisecondDiff = millisecondDiff % 60;

		timeRemaining.seconds = Math.floor(millisecondDiff); // seconds

        setTimeout(function() {
            timer(endDate, callback);
        }, interval);
    }
    
    callback(timeRemaining);
}
</pre>
<p></noscript></p>
<p>It&#8217;s easy to use! You specify an end date (as a string, though Date object&#8217;s should work as well) and pass in a callback that gets triggered at a set interval. The callback receives a JSON object with properties for days, hours, minutes and seconds. You can pass in a custom interval if you want the callback triggered at a different period. Examples below.</p>
<p><script src="https://gist.github.com/842737.js?file=jsTimer-test.js"></script><br />
<noscript></p>
<pre>
timer('2011-12-31', function(timeRemaining) {
	console.log('Timer 1:', timeRemaining);
});

// This will run every minute, instead of every second
timer('2012-12-31', function(timeRemaining) {
	console.log('Timer 2:', timeRemaining);
}, 60000);
</pre>
<p></noscript></p>
<p>Interested? See it in action: <a href="http://jsfiddle.net/mjangda/vGv7J/1/">http://jsfiddle.net/mjangda/vGv7J/1/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://digitalize.ca/2011/02/javascript-countdown-timer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript Tip: Bust and Disable console.log</title>
		<link>http://digitalize.ca/2011/02/javascript-tip-bust-and-disable-console-log/</link>
		<comments>http://digitalize.ca/2011/02/javascript-tip-bust-and-disable-console-log/#comments</comments>
		<pubDate>Wed, 16 Feb 2011 17:01:53 +0000</pubDate>
		<dc:creator>Mohammad Jangda</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[console.log]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[javascript errors]]></category>
		<category><![CDATA[web inspector]]></category>

		<guid isPermaLink="false">http://digitalize.ca/?p=1427</guid>
		<description><![CDATA[Here&#8217;s a quick and dirty follow-up to my original Save me from console.log errors. The main improvement to this version is that it includes a way to disable console.log (and related functions), for example, in production environments. While console.log is awesome, you really don&#8217;t want your dirty inner workings littering up the Console (or visible [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quick and dirty follow-up to my original <a title="Javascript Tip: Save me from console.log errors" href="http://digitalize.ca/2010/04/javascript-tip-save-me-from-console-log-errors/">Save me from console.log errors</a>. The main improvement to this version is that it includes a way to <strong>disable</strong> console.log (and related functions), for example, in production environments.</p>
<p>While console.log is awesome, you really don&#8217;t want your dirty inner workings littering up the Console (or visible to the user &#8212; though, you could make an argument that this is a great way to debug errors in live environments) once your app is deployed.</p>
<p><strong>Note:</strong> Firebug can get unhappy sometimes if you try to mess with its console object. But, in theory, this approach should work.</p>
<p><script src="https://gist.github.com/829696.js?file=console-busting.js"></script><br />
<noscript></p>
<pre>
var DEBUG_MODE = true; // Set this value to false for production

if(typeof(console) === 'undefined') {
    console = {}
}

if(!DEBUG_MODE || typeof(console.log) === 'undefined') {
    // FYI: Firebug might get cranky...
    console.log = console.error = console.info = console.debug = console.warn = console.trace = console.dir = console.dirxml = console.group = console.groupEnd = console.time = console.timeEnd = console.assert = console.profile = function() {};
}
</pre>
<p></noscript></p>
]]></content:encoded>
			<wfw:commentRss>http://digitalize.ca/2011/02/javascript-tip-bust-and-disable-console-log/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Link: CSS sprite generator</title>
		<link>http://digitalize.ca/2010/12/link-css-sprite-generator/</link>
		<comments>http://digitalize.ca/2010/12/link-css-sprite-generator/#comments</comments>
		<pubDate>Wed, 15 Dec 2010 17:54:06 +0000</pubDate>
		<dc:creator>Mohammad Jangda</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[sprites]]></category>

		<guid isPermaLink="false">http://digitalize.ca/?p=1376</guid>
		<description><![CDATA[If you ever find yourself needing to manually build CSS sprites, do yourself a favour and shoot yourself in the head. Then download this Photoshop script and use it. Arnau March &#8211; CSS sprite generator. (via Chris Coyier)]]></description>
			<content:encoded><![CDATA[<p><a href="http://arnaumarch.com/en/sprites.html"><img src="http://digitalize.ca/media/sprites-5-300x164.jpg" alt="Sweet, sweet CSS" width="300" height="164" class="aligncenter size-medium wp-image-1377" /></a></p>
<p>If you ever find yourself needing to manually build CSS sprites, do yourself a favour and shoot yourself in the head. Then download this Photoshop script and use it.</p>
<p><a title="Sweet CSS Sprites!" href="http://arnaumarch.com/en/sprites.html">Arnau March &#8211; CSS sprite generator.</a></p>
<p>(via <a href="http://twitter.com/#!/chriscoyier/status/12608112024363008">Chris Coyier</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://digitalize.ca/2010/12/link-css-sprite-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[[Prototype]] vs prototype (Peter van der Zee on JSMentors)</title>
		<link>http://digitalize.ca/2010/12/prototype-vs-prototype-peter-van-der-zee-on-jsmentors/</link>
		<comments>http://digitalize.ca/2010/12/prototype-vs-prototype-peter-van-der-zee-on-jsmentors/#comments</comments>
		<pubDate>Fri, 10 Dec 2010 17:01:42 +0000</pubDate>
		<dc:creator>Mohammad Jangda</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[prototype]]></category>

		<guid isPermaLink="false">http://digitalize.ca/?p=1364</guid>
		<description><![CDATA[Here&#8217;s a great explanation (by Peter van der Zee) of the key differences between [[Prototype]] and prototype in JavaScript. It finally makes sense now! Note: to understand this explanation it would help to know what prototype is/does and how it works. So we have [[Prototype]] and prototype. You can see prototype as the parent object [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a great explanation (by <a href="http://qfox.nl/">Peter van der Zee</a>) of the key differences between [[Prototype]] and prototype in JavaScript. It finally makes sense now!</p>
<blockquote><p>
Note: to understand this explanation it would help to know what prototype is/does and how it works.</p>
<p>So we have [[Prototype]] and prototype. You can see prototype as the parent object to which [[Prototype]] (so __proto__) refers to on instances of the constructor. Hah, I&#8217;m sure that&#8217;s not confusing. So let me give an example :)</p>
<p>var A = function(){};<br />
var a = new A();<br />
log(a instanceof A); // true<br />
log(A.prototype); // object<br />
log(a.prototype); // undefined<br />
log(a.__proto__); // object, in browsers that support the mapping<br />
log(a.__proto__=== A.prototype); // true.</p>
<p>&#8220;A&#8221; has a prototype property (A.prototype). If you add new properties to that object, they will automagically be available on &#8220;a&#8221;. &#8220;a&#8221; has a [[Prototype]] internal property. It refers to A.prototype. It is an essential part of the prototypal chain because it actually determines the next part of the chain. If you change a.[[Prototype]], changes to A.prototype will no longer be reflected on &#8220;a&#8221;. In fact, all not &#8220;own&#8221; properties of a will no longer be accessible and are replaced by a new set of properties.
</p></blockquote>
<p>via <a href="http://jsmentors.com/pipermail/jsmentors_jsmentors.com/2010-December/000215.html">[JSMentors] Object creation</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://digitalize.ca/2010/12/prototype-vs-prototype-peter-van-der-zee-on-jsmentors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Survey For People Who Make Websites, 2010</title>
		<link>http://digitalize.ca/2010/10/the-survey-for-people-who-make-websites-2010/</link>
		<comments>http://digitalize.ca/2010/10/the-survey-for-people-who-make-websites-2010/#comments</comments>
		<pubDate>Tue, 19 Oct 2010 20:02:39 +0000</pubDate>
		<dc:creator>Mohammad Jangda</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[etc.]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[a list apart]]></category>
		<category><![CDATA[survey]]></category>
		<category><![CDATA[websites]]></category>

		<guid isPermaLink="false">http://digitalize.ca/?p=1256</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a href="http://alistapart.com/articles/survey2010"><img src="http://digitalize.ca/media/i-took-the-2010-survey.gif" alt="The Survey For People Who Make Websites, 2010" title="The Survey For People Who Make Websites, 2010" width="180" height="46" class="aligncenter size-full wp-image-1257" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://digitalize.ca/2010/10/the-survey-for-people-who-make-websites-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FITC Mobile 2010 Presentation: HTML5, CSS3, and other fancy buzzwords</title>
		<link>http://digitalize.ca/2010/09/fitc-mobile-2010-presentation/</link>
		<comments>http://digitalize.ca/2010/09/fitc-mobile-2010-presentation/#comments</comments>
		<pubDate>Sat, 18 Sep 2010 16:36:50 +0000</pubDate>
		<dc:creator>Mohammad Jangda</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[mobileweb]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[vortex]]></category>

		<guid isPermaLink="false">http://digitalize.ca/?p=700</guid>
		<description><![CDATA[My presentation at FITC Mobile 2010 went better than I expected! The slides are embedded below and can be downloaded here. Note: the animations in the slideshare version don&#8217;t work. HTML5, CSS3, and other fancy buzzwords Also, check out some really dumbed down demos I made.]]></description>
			<content:encoded><![CDATA[<p>My presentation at <a href="http://www.fitc.ca/events/about/?event=109">FITC Mobile 2010</a> went better than I expected! The slides are embedded below and can be <a href="http://digitalize.ca/fitc2010/">downloaded here</a>.</p>
<p><strong>Note:</strong> the animations in the slideshare version don&#8217;t work.</p>
<div style="width:425px" id="__ss_5229563"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/batmoo/html5-css3-and-other-fancy-buzzwords" title="HTML5, CSS3, and other fancy buzzwords">HTML5, CSS3, and other fancy buzzwords</a></strong><object id="__sse5229563" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=fitchtml5-100918105348-phpapp01&#038;stripped_title=html5-css3-and-other-fancy-buzzwords&#038;userName=batmoo" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed name="__sse5229563" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=fitchtml5-100918105348-phpapp01&#038;stripped_title=html5-css3-and-other-fancy-buzzwords&#038;userName=batmoo" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object></div>
<p>Also, check out some really <a href="http://digitalize.ca/fitc2010/demos/">dumbed down demos I made</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://digitalize.ca/2010/09/fitc-mobile-2010-presentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Tip: Hooking into Widget Save Callback</title>
		<link>http://digitalize.ca/2010/09/wordpress-tip-hooking-into-widget-save-callback/</link>
		<comments>http://digitalize.ca/2010/09/wordpress-tip-hooking-into-widget-save-callback/#comments</comments>
		<pubDate>Tue, 14 Sep 2010 01:23:48 +0000</pubDate>
		<dc:creator>Mohammad Jangda</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[callbacks]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://digitalize.ca/?p=694</guid>
		<description><![CDATA[John Gadbois turned some code I gave him into short and useful write-up on how to hook into AJAX calls triggered when saving widgets. It makes use of jQuery&#8217;s Global AJAX event handlers, which allow for some very cool things, especially when you&#8217;re working with external libraries that use the jQuery AJAX methods. A future [...]]]></description>
			<content:encoded><![CDATA[<p>John Gadbois turned some code I gave him into <a href="http://www.johngadbois.com/adding-your-own-callbacks-to-wordpress-ajax-requests/">short and useful write-up</a> on how to hook into AJAX calls triggered when saving widgets. It makes use of jQuery&#8217;s <a href="http://api.jquery.com/category/ajax/global-ajax-event-handlers/">Global AJAX event handlers</a>, which allow for some very cool things, especially when you&#8217;re working with external libraries that use the jQuery AJAX methods. A future blog post will cover how plugins can use the ajaxSend event to hook into WordPress&#8217; autosave.</p>
]]></content:encoded>
			<wfw:commentRss>http://digitalize.ca/2010/09/wordpress-tip-hooking-into-widget-save-callback/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Plugin: HTML5 Inline Data</title>
		<link>http://digitalize.ca/2010/07/jquery-plugin-html5-inline-data/</link>
		<comments>http://digitalize.ca/2010/07/jquery-plugin-html5-inline-data/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 21:23:31 +0000</pubDate>
		<dc:creator>Mohammad Jangda</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://digitalize.ca/?p=673</guid>
		<description><![CDATA[HTML5 Data Attributes are sexy. What&#8217;s sexier is an easy way to work with these data attributes using jQuery. Sure, you could do something like: jQuery('#pancakes').attr('data-type'); But who wants to type the &#8220;data-&#8221; prefix over and over again? So, here&#8217;s a quick little plugin I whipped up. It&#8217;s probably terrible when it comes to jQuery [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://ejohn.org/blog/html-5-data-attributes/">HTML5 Data Attributes</a> are sexy.</p>
<p>What&#8217;s sexier is an easy way to work with these data attributes using jQuery.</p>
<p>Sure, you could do something like:</p>
<pre>
jQuery('#pancakes').attr('data-type');
</pre>
<p>But who wants to type the <strong>&#8220;data-&#8221;</strong> prefix over and over again? </p>
<p>So, here&#8217;s a quick little plugin I whipped up. It&#8217;s probably terrible when it comes to jQuery plugin standards (I do <a href="http://digitalize.ca/wordpress-plugins/">WordPress plugins</a>, not jQuery), but it works. It works as a getter and setter.</p>
<p><strong>Bonus:</strong> If you&#8217;re using jQuery 1.4.1+, the plugin supports well-formed JSON objects as data attribute values.</p>
<p><script src="http://gist.github.com/486451.js?file=jquery.inlinedata.js"></script><br />
<noscript></p>
<pre>
/*
* Inline Data - get and set HTML5 data attributes! Yay!
*
* Copyright (c) 2010 Mohammad Jangda (<a href="http://digitalize.ca" rel="nofollow">http://digitalize.ca</a>), Vortex Mobile (<a href="http://www.vortexmobile.ca" rel="nofollow">http://www.vortexmobile.ca</a>)
*
* Licensed under the MIT license:
* <a href="http://www.opensource.org/licenses/mit-license.php" rel="nofollow">http://www.opensource.org/licenses/mit-license.php</a>
*
*/

(function($) {
    $.fn.inlinedata = function(name, value) {
        
        var prefix = 'data-';
        var attr = prefix + name;
        var values = []
        
        this.each(function(i) {
            var attrValue;
            
            // Setting values
            if(value) {
                // If an array is passed, the array index should correspond to the collection index
                if($.isArray(value)) {
                    // Check, check, check the index. Because out of bounds exceptions are the devil!
                    if(typeof(value[i]) !== 'undefined')
                        attrValue = value[i];
                    else
                        attrValue = '';
                } else {
                    // Not an array, so we're just giving all the elements the same value
                    attrValue = value;
                }
                this.setAttribute(attr, attrValue);
            } else {
                // Getting values
                attrValue = this.getAttribute(attr);
                
                try {
                    // try parsing as JSON
                    attrValue = jQuery.parseJSON(attrValue);
                } catch(e) { }
            }
            attrValue = (attrValue) ? attrValue : '';
            values.push(attrValue);
        });
        
        if(values.length == 1)
            return values[0]
        
        return values;
    }
})(jQuery);
</pre>
<p></noscript></p>
<p>Usage is simple:</p>
<p><script src="http://gist.github.com/486451.js?file=jquery.inlinedata.usage.html"></script><br />
<noscript></p>
<pre>
<span id="hello" data-world="aloha"></span>

<span id="goodbye"></span>

<span class="cupcake" data-type="vanilla"></span>
<span class="cupcake" data-type="chocolate"></span>

<span class="icecream" data-type="fudge"></span>

<span class="donut" data-details='{"sprinkles":"many"}'></span>

<script type="text/javascript">
// Grab the data-world attrbute from the DOM element with id = hello
$('#hello').inlinedata('world'); // returns 'aloha'

// If the element doesn't have a matching attribute, it returns an empty string
$('#goodbye').inlinedata('world'); // returns ''

// Can be used with jQuery collections
// Collections get returned an array: ['abc', 'def']
$('.cupcake').inlinedata('type'); // returns ['vanilla', 'chocolate']

// If the collection only has one item, you get a string back: 'abc'
$('.icecream').inlinedata('type'); // returns 'fudge'

// You can set the data attribute as well by passing in a second parameter
$('#hello').inlinedata('world', 'jambo'); // sets data-world = jambo and returns 'jambo'

// You can set the data attribute for a collection too
$('.cupcake').inlinedata('type', 'delicious'); // sets data-type for all the elements in to 'delicious' and returns ['delicious', 'delicious']

// Want to store JSON objects in your data attributes? go right ahead! But, you need jQuery 1.4.1+
$('.donut').inlinedata('details'); // returns { sprinkles: "many" }

</script>
</pre>
<p></noscript></p>
]]></content:encoded>
			<wfw:commentRss>http://digitalize.ca/2010/07/jquery-plugin-html5-inline-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript Tip: Save me from console.log errors</title>
		<link>http://digitalize.ca/2010/04/javascript-tip-save-me-from-console-log-errors/</link>
		<comments>http://digitalize.ca/2010/04/javascript-tip-save-me-from-console-log-errors/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 19:36:20 +0000</pubDate>
		<dc:creator>Mohammad Jangda</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[console.log]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[web inspector]]></category>

		<guid isPermaLink="false">http://digitalize.ca/?p=498</guid>
		<description><![CDATA[It&#8217;s bound to happen. You build yourself a sweet webapp with some sweet javascript action and you unleash it to the world only to get angry emails yelling, &#8220;IT DOESn&#8217;T WoRK! FIX iT okAy?&#8221; And it&#8217;s the darndest problem because it&#8217;s happening to both IE and Firefox users (Chrome and Safari users have been silent) [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s bound to happen. You build yourself a sweet webapp with some sweet javascript action and you unleash it to the world only to get angry emails yelling, &#8220;IT DOESn&#8217;T WoRK! FIX iT okAy?&#8221; And it&#8217;s the darndest problem because it&#8217;s happening to both IE <em>and</em> Firefox users (Chrome and Safari users have been silent) and you can&#8217;t replicate it.</p>
<p>And then you spend hours trying to figure out the problem  to no avail, leaving you scratching that magnificent head of yours with luscious, flowing hair. You just can&#8217;t replicate the problem. But then, after hours and days of staring intently at the screen, you find it. It&#8217;s a rogue <strong>console.log</strong> call that you forgot to comment out. And then you spend the remainder of the week chastising yourself for being stupid.</p>
<p>It happens. (To be fair, it&#8217;s not your fault that your users don&#8217;t have Firebug or IE Developer Tools installed. Blame it on Mozilla/Microsoft.)</p>
<p>But there&#8217;s an easy solution. Just copy the following javascript somewhere in your project, and rest easy:</p>
<p><script src="https://gist.github.com/384113.js?file=console-error.js"></script><br />
<noscript></p>
<pre>
if(typeof(console) === 'undefined') {
    var console = {}
    console.log = console.error = console.info = console.debug = console.warn = console.trace = console.dir = console.dirxml = console.group = console.groupEnd = console.time = console.timeEnd = console.assert = console.profile = function() {};
}
</pre>
<p></noscript></p>
]]></content:encoded>
			<wfw:commentRss>http://digitalize.ca/2010/04/javascript-tip-save-me-from-console-log-errors/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>WordPress Plugin: HTML Emails</title>
		<link>http://digitalize.ca/2010/04/wordpress-plugin-html-emails/</link>
		<comments>http://digitalize.ca/2010/04/wordpress-plugin-html-emails/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 16:35:51 +0000</pubDate>
		<dc:creator>Mohammad Jangda</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[html emails]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://digitalize.ca/?p=632</guid>
		<description><![CDATA[Tired of all those boring emails that you get from WordPress? Do you dread opening emails from WordPress because plain text and/or over-querystringified links terrify you? Rest easy friend, HTML emails for WordPress are here. HTML Emails replaces the standard WordPress emails with spruced up versions that simply look good. Sample included below: Currently, only [...]]]></description>
			<content:encoded><![CDATA[<p>Tired of all those boring emails that you get from WordPress? Do you dread opening emails from WordPress because plain text and/or over-querystringified links terrify you? Rest easy friend, HTML emails for WordPress are here.</p>
<p><a href="http://wordpress.org/extend/plugins/html-emails/" target="_blank">HTML Emails</a> replaces the standard WordPress emails with spruced up versions that simply look good. Sample included below:</p>
<p><a href="http://digitalize.ca/media/WordPressHTMLEmail1.png"><img src="http://digitalize.ca/media/WordPressHTMLEmail1-300x240.png" alt="New Comment Notification as seen in Gmail" title="New Comment Notification as seen in Gmail" width="300" height="240" class="aligncenter size-medium wp-image-631" /></a></p>
<p>Currently, only comment notifications are HTML-ized (new comment and comment moderation emails), but I&#8217;m hoping to add all other email notifications soon (and yes, that includes Multi-Site emails coming with WordPress 3.0).</p>
<p>While I have only tested the emails on Gmail, Gmail on Android, and Outlook, they should work on most email clients (including clients without HTML support). If you&#8217;re using a client other than the 3 I&#8217;ve listed, I would appreciate <a href="mailto:batmoo@gmail.com">an email</a> with info on whether the email looks like it should and works correctly.</p>
<p>Don&#8217;t like my design chops? (Go ahead, admit it!) I&#8217;ve got you covered! HTML emails makes it easy to fully customize the look and feel of emails sent by WordPress. See the Other Notes section on the Plugin page for details on how to customize emails. More detailed walkthroughs to come.</p>
<p>Grab it from the <a href="http://wordpress.org/extend/plugins/html-emails/" target="_blank">Plugin Directory</a> or install directly from WordPress (Plugins > Add New, search for HTML Emails).</p>
]]></content:encoded>
			<wfw:commentRss>http://digitalize.ca/2010/04/wordpress-plugin-html-emails/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
	</channel>
</rss>

