<?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; Blog</title>
	<atom:link href="http://digitalize.ca/cat/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://digitalize.ca</link>
	<description>The webpage of Mohammad Jangda</description>
	<lastBuildDate>Thu, 22 Jul 2010 21:23:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<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 (http://digitalize.ca), Vortex Mobile (http://www.vortexmobile.ca)
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/mit-license.php
*
*/

(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>Photo: &#8220;A city within a park&#8221;</title>
		<link>http://digitalize.ca/2010/05/photo-a-city-within-a-park/</link>
		<comments>http://digitalize.ca/2010/05/photo-a-city-within-a-park/#comments</comments>
		<pubDate>Tue, 04 May 2010 16:39:05 +0000</pubDate>
		<dc:creator>Mohammad Jangda</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Photos]]></category>
		<category><![CDATA[parks]]></category>
		<category><![CDATA[Toronto]]></category>

		<guid isPermaLink="false">http://digitalize.ca/?p=658</guid>
		<description><![CDATA[Berczy Park (in Toronto) rocks.]]></description>
			<content:encoded><![CDATA[<p><a alt="Berczy Park" href="http://digitalize.ca/media/wpid-2010-04-30-09.15.261.jpg"><img style="display:block;margin-right:auto;margin-left:auto;" alt="image" src="http://digitalize.ca/media/wpid-2010-04-30-09.15.26.jpg" /></a></p>
<p><a href="http://maps.google.com/maps?f=q&#038;source=s_q&#038;hl=en&#038;geocode=&#038;q=Berczy+Park,+Toronto,+Ontario,+Canada&#038;sll=43.647939,-79.375148&#038;sspn=0.003594,0.009645&#038;ie=UTF8&#038;hq=Berczy+Park&#038;hnear=Berczy+Park,+Toronto,+ON,+Canada&#038;ll=43.652597,-79.375277&#038;spn=0,0.077162&#038;z=14&#038;layer=c&#038;cbll=43.647812,-79.375038&#038;panoid=Pxmoa-uyJse-DgSA6bg22A&#038;cbp=12,313.82,,0,5">Berczy Park</a> (in Toronto) rocks.</p>
]]></content:encoded>
			<wfw:commentRss>http://digitalize.ca/2010/05/photo-a-city-within-a-park/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gettin&#8217; gisty</title>
		<link>http://digitalize.ca/2010/04/gettin-gisty/</link>
		<comments>http://digitalize.ca/2010/04/gettin-gisty/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 16:34:03 +0000</pubDate>
		<dc:creator>Mohammad Jangda</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://digitalize.ca/?p=654</guid>
		<description><![CDATA[I love gisthub.]]></description>
			<content:encoded><![CDATA[<p>I love <a href="http://gist.github.com/mjangda">gisthub</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://digitalize.ca/2010/04/gettin-gisty/feed/</wfw:commentRss>
		<slash:comments>2</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[Scripts]]></category>
		<category><![CDATA[Web Development]]></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>
<pre class="brush: jscript;">
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>Code is also on the <a href="http://gist.github.com/384113">gisthub</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://digitalize.ca/2010/04/javascript-tip-save-me-from-console-log-errors/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>On Licensing</title>
		<link>http://digitalize.ca/2010/04/on-licensing/</link>
		<comments>http://digitalize.ca/2010/04/on-licensing/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 14:12:45 +0000</pubDate>
		<dc:creator>Mohammad Jangda</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[license]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://digitalize.ca/?p=646</guid>
		<description><![CDATA[I think I&#8217;ll be using this license for pretty much all my future work: All files in this repository are covered by the: DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 Copyright (C) 2004 Sam Hocevar Everyone is permitted to copy and distribute verbatim or modified copies of this license [...]]]></description>
			<content:encoded><![CDATA[<p>I think I&#8217;ll be using <a href="http://github.com/llimllib/refresh-canvas/blob/master/tutorial/LICENSE">this license</a> for pretty much all my future work:</p>
<blockquote><p>
All files in this repository are covered by the:</p>
<p>DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE<br />
Version 2, December 2004 </p>
<p>Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> </p>
<p>Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. </p>
<p>DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION </p>
<p>0. You just DO WHAT THE FUCK YOU WANT TO.
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://digitalize.ca/2010/04/on-licensing/feed/</wfw:commentRss>
		<slash:comments>1</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>12</slash:comments>
		</item>
		<item>
		<title>Plugin Preview: HTML Emails for WordPress</title>
		<link>http://digitalize.ca/2010/04/plugin-preview-html-emails/</link>
		<comments>http://digitalize.ca/2010/04/plugin-preview-html-emails/#comments</comments>
		<pubDate>Fri, 02 Apr 2010 15:02:12 +0000</pubDate>
		<dc:creator>Mohammad Jangda</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://digitalize.ca/?p=624</guid>
		<description><![CDATA[HTML emails from WordPress? Yes, please! Coming very, very soon!]]></description>
			<content:encoded><![CDATA[<p><a href="http://digitalize.ca/media/WordPressHTMLEmail.png"><img class="aligncenter size-full wp-image-625" title="WordPressHTMLEmail" src="http://digitalize.ca/media/WordPressHTMLEmail.png" alt="" width="658" height="528" /></a></p>
<p style="text-align: center;">HTML emails from WordPress? Yes, please!</p>
<p style="text-align: center;">Coming very, very soon!</p>
]]></content:encoded>
			<wfw:commentRss>http://digitalize.ca/2010/04/plugin-preview-html-emails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Magic: Building a static countdown clock using PHP and GD</title>
		<link>http://digitalize.ca/2010/03/php-magic-building-a-static-countdown-clock-using-php-and-gd/</link>
		<comments>http://digitalize.ca/2010/03/php-magic-building-a-static-countdown-clock-using-php-and-gd/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 21:17:11 +0000</pubDate>
		<dc:creator>Mohammad Jangda</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[countdown]]></category>
		<category><![CDATA[gd]]></category>
		<category><![CDATA[glee]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://digitalize.ca/?p=616</guid>
		<description><![CDATA[Update (2010-04-20): These Gleeks are crazy. Since being released, the clock has been viewed over 200,000 times. Insane. If you like Glee, you&#8217;ll like this. If you like image processing using PHP, you&#8217;ll like this even more. Using PHP and the GD image library*, it&#8217;s pretty easy to create a static, image-based countdown clock, which [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update (2010-04-20):</strong> These Gleeks are crazy. Since being released, the clock has been viewed over 200,000 times. Insane.</p>
<p>If you like Glee, you&#8217;ll like this. If you like image processing using PHP, you&#8217;ll like this even more.</p>
<p>Using PHP and the GD image library*, it&#8217;s pretty easy to create a static, image-based countdown clock, which is useful for situations where javascript cannot be used (think <a href="http://wordpress.com">WordPress.com</a>/<a href="http://blogger.com">Blogger</a>). A new image is automatically generated server-side for every minute (assuming a request is made for the clock for that minute), and all images are cached to avoid killing the server processor. Check it out in action on <a href="http://gleeksunited.wordpress.com/2010/03/02/42-days-until-glee/">Gleeks United</a> or after the jump.</p>
<p>Don&#8217;t have code yet, but I&#8217;ll post it when I get a chance.</p>
<p><span id="more-616"></span></p>
<p><span style="display:block;text-align:center;"><br />
<strong>Vertical version:</strong><br />
<img src="http://digitalize.ca/glee/countdown.php" alt="Glee Countdown!"><br />
<span style="display:block;text-align:center;font-size:10px;">Powered by <a href="http://gleeksunited.wordpress.com" target="_blank">Gleeks United</a></span><br />
</span></p>
<p><strong>Horizontal version:</strong><br />
<img src="http://digitalize.ca/glee/countdown-h.php" alt="Glee Countdown!"><br />
<span style="display:block;text-align:center;font-size:10px;">Powered by <a href="http://gleeksunited.wordpress.com" target="_blank">Gleeks United</a></span></p>
<p><small>* Yes, ImageMagick could work too, but it&#8217;s too much of a pain to install.</small></p>
]]></content:encoded>
			<wfw:commentRss>http://digitalize.ca/2010/03/php-magic-building-a-static-countdown-clock-using-php-and-gd/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>jQTouch: Tap vs Click</title>
		<link>http://digitalize.ca/2010/02/jqtouch-tap-vs-click/</link>
		<comments>http://digitalize.ca/2010/02/jqtouch-tap-vs-click/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 16:42:38 +0000</pubDate>
		<dc:creator>Mohammad Jangda</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jqtouch]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://digitalize.ca/?p=570</guid>
		<description><![CDATA[jQTouch has a sweet feature which adds a fast touch or &#8220;tap&#8221; event. It&#8217;s pointless for me to try and rephrase, so learn all about it on the jQTouch blog: Milliseconds Responsiveness and the Fast Tap Now, the only downside to the tap event, is that it doesn&#8217;t work on anything other than Mobile Safari. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://jqtouch.com">jQTouch</a> has a sweet feature which adds a fast touch or &#8220;tap&#8221; event. It&#8217;s pointless for me to try and rephrase, so learn all about it on the jQTouch blog: <a href="http://blog.jqtouch.com/post/205113875/milliseconds-responsiveness-and-the-fast-tap">Milliseconds Responsiveness and the Fast Tap</a></p>
<p>Now, the only downside to the tap event, is that it doesn&#8217;t work on anything <em>other</em> than Mobile Safari. So for iPhones, you can use tap event, but non-iPhones, you have to use click event. You could just make things easy on yourself and use clicks across the board, but I can tell you that the tap event immensely increases the performance and responsivity for jQTouch apps on iPhones. Good news is, there&#8217;s an easy way to work with both.</p>
<p>The code below was inspired by <a href="http://groups.google.com/group/jqtouch/browse_thread/thread/4de4f07cb233aabc?tvc=2#07e694cadd199702">Samuel&#8217;s message</a> on the jQTouch Google Group.</p>
<pre class="brush: xml;">
&lt;script type=&quot;text/javascript&quot;&gt;
var userAgent = navigator.userAgent.toLowerCase();
var isiPhone = (userAgent.indexOf('iphone') != -1 || userAgent.indexOf('ipod') != -1) ? true : false;
clickEvent = isiPhone ? 'tap' : 'click';
&lt;/script&gt;
</pre>
<p>You can now easily bind your events as follows:</p>
<pre class="brush: xml;">
&lt;a href=&quot;#link&quot; id=&quot;mylink&quot;&gt;Click or Tap me!&lt;/a&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
$('#mylink').bind(clickEvent, function() {
    e.preventDefault();
    alert('Yay! You just ' + clickEvent + 'ed me!');
});
&lt;/script&gt;
</pre>
<p>Note: in my testing, the tap event doesn&#8217;t register too well on the iPod Touch. If that seems to be the case, I&#8217;d recommend defaulting iPod Touches to use clicks instead. However, since the iPod Touch user agent includes the term &#8220;iPhone&#8221;, we have to un-include it from our tap list:</p>
<pre class="brush: xml;">
&lt;script type=&quot;text/javascript&quot;&gt;
var userAgent = navigator.userAgent.toLowerCase();
var isiPhone = (userAgent.indexOf('iphone') != -1) ? true : false;
if(userAgent.indexOf('ipod') != -1) isiPhone = false; // turn off taps for iPod Touches
clickEvent = isiPhone ? 'tap' : 'click';
&lt;/script&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://digitalize.ca/2010/02/jqtouch-tap-vs-click/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Introducing Zen: Distraction-free writing for WordPress</title>
		<link>http://digitalize.ca/2010/02/announcing-zen-distraction-free-writing-for-wordpress/</link>
		<comments>http://digitalize.ca/2010/02/announcing-zen-distraction-free-writing-for-wordpress/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 16:00:43 +0000</pubDate>
		<dc:creator>Mohammad Jangda</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://digitalize.ca/?p=573</guid>
		<description><![CDATA[I&#8217;m excited to announce the release of Zen v1.0, a plugin for WordPress that brings the much beloved idea of distraction-free writing to the WordPress admin. I provided a sneak peek of the plugin a few weeks ago, and after some fine tuning a lot of awesome changes, Zen is finally ready for prime-time. If [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://digitalize.ca/media/Zen-Mode.png"><img class="aligncenter size-medium wp-image-583" title="Zen Mode" src="http://digitalize.ca/media/Zen-Mode-300x125.png" alt="" width="300" height="125" /></a></p>
<p>I&#8217;m excited to announce the release of Zen v1.0, a plugin for WordPress that brings the much beloved idea of distraction-free writing to the WordPress admin.</p>
<p>I provided a <a href="http://digitalize.ca/2010/01/distraction-free-wordpress-ing/">sneak peek of the plugin</a> a few weeks ago, and after some fine tuning a lot of awesome changes, Zen is finally ready for prime-time.</p>
<p>If you can&#8217;t wait till the end of this post, download it directly from WordPress (under <strong>Plugins &gt; Add New</strong>, search for &#8220;Zen&#8221;) or grab it from the <a href="http://wordpress.org/extend/plugins/zen/" target="_blank">WordPress Plugins Directory</a>.</p>
<h3>What is Zen?</h3>
<p>In a nutshell, Zen is a distraction-free environment for WordPress.</p>
<p><span id="more-573"></span></p>
<p>If you’re a fan of <a href="http://www.hogbaysoftware.com/products/writeroom">WriteRoom</a>, <a href="http://www.ommwriter.com/">OmmWriter</a>, or similar tools that help you focus on your words instead of the tools you’re using, this plugin will soon make your wildest dreams come true (and give you a simple clean environment within WordPress to write to your heart&#8217;s content)! While Zen does not replace the existing Edit Post/Page screen, it provides a layer on top that will help you focus more on the quality of your words and less on the distracting fine-tuning of minuscule details.</p>
<p>I&#8217;ve got a quick breakdown of the plugin and it&#8217;s features below.</p>
<h3>Zen Mode</h3>
<p><a href="http://digitalize.ca/media/Zen-Button.png"><img class="aligncenter size-medium wp-image-582" title="Zen Button" src="http://digitalize.ca/media/Zen-Button-300x130.png" alt="" width="300" height="130" /></a></p>
<p>Zen adds a handy-dandy little button right above the publish module that toggles Zen mode (you can also use the keyboard shortcut listed below).</p>
<p>Zen mode includes a textboxes for the title and content, save and publish buttons below them, and a close button on the top left.</p>
<p>To leave Zen mode, click on the close button or use the keyboard shortcut below.</p>
<p>The content textbox is a basic textbox without the Visual and HTML editors. Initially, this was because of an issue with the HTML editor, but it&#8217;s become more of a conscious choice since it keeps with the whole mantra of distraction-free writing. If you think that it would be worthwhile to include the Visual and HTML editors, let me know, and I&#8217;ll consider it.</p>
<p>Yes, you can write in HTML in the textbox.</p>
<p>And yes, autosave still works in Zen mode, so you can rest assured that WordPress will chug away in the background to keep your writing safe as you work on that next great blog post.</p>
<h3>Zen Settings</h3>
<p><a href="http://digitalize.ca/media/Zen-Settings.png"><img class="aligncenter size-medium wp-image-584" title="Zen Settings" src="http://digitalize.ca/media/Zen-Settings-300x159.png" alt="" width="300" height="159" /></a></p>
<p>Settings for Zen are accessible via <strong>Users &gt; Your Profile</strong>. At this point, you can specify whether Zen should automatically open when you go to Add or Edit a Post or Page and your preferred theme. I&#8217;m considering adding the option to include additional modules (Categories and Post Tags) in Zen mode as well.</p>
<h3>Keyboard Shortcuts</h3>
<p>Zen has simple keyboard shortcuts to help you get the most out of Zen:</p>
<p>z &#8211; enters Zen mode<br />
q &#8211; exit Zen mode<br />
t &#8211; switch theme</p>
<p><strong>Note:</strong> the keyboard shortcuts do not work while you&#8217;re writing in one of the textboxes. This is something I&#8217;m hoping to change in a future release.</p>
<h3>Themes</h3>
<p><a href="http://digitalize.ca/media/Zen-Themes.png"><img class="aligncenter size-medium wp-image-585" title="Zen Themes" src="http://digitalize.ca/media/Zen-Themes-300x158.png" alt="" width="300" height="158" /></a></p>
<p>Zen comes prepackaged with 5 themes:</p>
<ul>
<li>Zen Light</li>
<li>Zen Dark</li>
<li>Zen Papyrus</li>
<li>Zen Papyrus Lite</li>
<li>Zen Terminal</li>
</ul>
<p>You can specify which theme you prefer under Zen Settings and Zen will automatically open with that theme enabled. You can easily switch between themes while in Zen mode using the &#8220;t&#8221; key. If you switch between themes, Zen will autosave your preference and load that next time you go into Zen mode.</p>
<h3>What Now?</h3>
<p>I&#8217;d love to add more themes to Zen, and have a few potentials lined up that I&#8217;ll release over the coming weeks. However, I&#8217;d really, love to see your theme ideas implemented as well. If you&#8217;d like to contribute a theme or have an idea for a theme, you should <a href="mailto:batmoo@gmail.com">contact me</a>.</p>
<p>If you have any features you&#8217;d like to see in Zen or found bugs that are driving you insane, you should <a href="mailto:batmoo@gmail.com">contact me</a></p>
<h3>Thanks</h3>
<p>Thanks go out to:</p>
<ul>
<li><a href="http://ifranky.com/2010/01/wordpress-vs-bloat/">ifranky</a>, <a href="http://habariproject.org/en/">Habari</a>, <a href="http://www.hogbaysoftware.com/products/writeroom">WriteRoom</a>, and <a href="http://www.ommwriter.com/">OmmWriter</a> for inspiring Zen.</li>
<li><a href="http://suzannegardner.ca">Suzanne Gardner</a> for providing beta feedback.</li>
<li><a href="http://andrewspittle.net">Andrew Spittle</a> for providing beta feedback and helping me with the base themes.</li>
</ul>
<hr />Seen enough and just can&#8217;t wait to get your Zen on? Download it directly from WordPress (under Plugins &gt; Add New, search for &#8220;Zen&#8221;) or grab it from the <a href="http://wordpress.org/extend/plugins/zen/" target="_blank">WordPress Plugins Directory</a>.</p>
<p>P.S. Yes, this post was entirely (except for adding images) written in Zen mode, and it was fantastic. My current themes of choice are Zen Terminal and Zen Papyrus Lite.</p>
]]></content:encoded>
			<wfw:commentRss>http://digitalize.ca/2010/02/announcing-zen-distraction-free-writing-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
