<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: jQTouch: Tap vs Click</title>
	<atom:link href="http://digitalize.ca/2010/02/jqtouch-tap-vs-click/feed/" rel="self" type="application/rss+xml" />
	<link>http://digitalize.ca/2010/02/jqtouch-tap-vs-click/</link>
	<description>Owned, operated, and obliterated by Mohammad Jangda</description>
	<lastBuildDate>Mon, 05 Dec 2011 08:31:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-beta3-20574</generator>
	<item>
		<title>By: Oskar</title>
		<link>http://digitalize.ca/2010/02/jqtouch-tap-vs-click/comment-page-1/#comment-30040</link>
		<dc:creator>Oskar</dc:creator>
		<pubDate>Fri, 04 Nov 2011 12:53:29 +0000</pubDate>
		<guid isPermaLink="false">http://digitalize.ca/?p=570#comment-30040</guid>
		<description>You have an error in your code: 
    $(&#039;#mylink&#039;).bind(clickEvent, function() {
        e.preventDefault();
        alert(&#039;Yay! You just &#039; + clickEvent + &#039;ed me!&#039;);
    });

It should be:
    function(e)</description>
		<content:encoded><![CDATA[<p>You have an error in your code:<br />
    $(&#8216;#mylink&#8217;).bind(clickEvent, function() {<br />
        e.preventDefault();<br />
        alert(&#8216;Yay! You just &#8216; + clickEvent + &#8216;ed me!&#8217;);<br />
    });</p>
<p>It should be:<br />
    function(e)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://digitalize.ca/2010/02/jqtouch-tap-vs-click/comment-page-1/#comment-18449</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Fri, 17 Jun 2011 13:24:02 +0000</pubDate>
		<guid isPermaLink="false">http://digitalize.ca/?p=570#comment-18449</guid>
		<description>I use something similar, checking for iPhone, iPod and iPad, as well as simulator and general mobile devices
&lt;code&gt;

var userAgent = navigator.userAgent.toLowerCase();
	var isMobile = (userAgent.indexOf(&#039;iphone&#039;) != -1 &#124;&#124; userAgent.indexOf(&#039;ipod&#039;) != -1 &#124;&#124; userAgent.indexOf(&#039;mobile&#039;) &#124;&#124; userAgent.indexOf(&#039;ipad&#039;)) ? true : false;
	clickEvent = isMobile ? &#039;tap&#039; : &#039;click&#039;;
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>I use something similar, checking for iPhone, iPod and iPad, as well as simulator and general mobile devices<br />
<code></p>
<p>var userAgent = navigator.userAgent.toLowerCase();<br />
	var isMobile = (userAgent.indexOf('iphone') != -1 || userAgent.indexOf('ipod') != -1 || userAgent.indexOf('mobile') || userAgent.indexOf('ipad')) ? true : false;<br />
	clickEvent = isMobile ? 'tap' : 'click';<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Mark</title>
		<link>http://digitalize.ca/2010/02/jqtouch-tap-vs-click/comment-page-1/#comment-10509</link>
		<dc:creator>David Mark</dc:creator>
		<pubDate>Sun, 21 Nov 2010 05:58:02 +0000</pubDate>
		<guid isPermaLink="false">http://digitalize.ca/?p=570#comment-10509</guid>
		<description>The cross-browser solution is to attach both click and tap listeners and cancel one of them the first time through.  You know you will get a tap first, so remove the click listener on tap.  If the click listener fires, remove the tap listener.

All of this UA sniffing is for the birds (as you have found out).</description>
		<content:encoded><![CDATA[<p>The cross-browser solution is to attach both click and tap listeners and cancel one of them the first time through.  You know you will get a tap first, so remove the click listener on tap.  If the click listener fires, remove the tap listener.</p>
<p>All of this UA sniffing is for the birds (as you have found out).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://digitalize.ca/2010/02/jqtouch-tap-vs-click/comment-page-1/#comment-8977</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Fri, 10 Sep 2010 07:32:00 +0000</pubDate>
		<guid isPermaLink="false">http://digitalize.ca/?p=570#comment-8977</guid>
		<description>Another thing I found is that on the desktop safari with emulated iphone i had to use &quot;click&quot; and not &quot;tap&quot;. Since I debug on my local host, it is enough to exclude localhost</description>
		<content:encoded><![CDATA[<p>Another thing I found is that on the desktop safari with emulated iphone i had to use &#8220;click&#8221; and not &#8220;tap&#8221;. Since I debug on my local host, it is enough to exclude localhost</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://digitalize.ca/2010/02/jqtouch-tap-vs-click/comment-page-1/#comment-8976</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Fri, 10 Sep 2010 07:28:05 +0000</pubDate>
		<guid isPermaLink="false">http://digitalize.ca/?p=570#comment-8976</guid>
		<description>All, the very good advice of John, but I wonder is it a good idea to track ipod ipad and iphone via indexOf. What if Apple added another mobile, iSomething? Would it not be better to track AppleWebKit.*Mobile using a regexp?</description>
		<content:encoded><![CDATA[<p>All, the very good advice of John, but I wonder is it a good idea to track ipod ipad and iphone via indexOf. What if Apple added another mobile, iSomething? Would it not be better to track AppleWebKit.*Mobile using a regexp?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tumble Weed</title>
		<link>http://digitalize.ca/2010/02/jqtouch-tap-vs-click/comment-page-1/#comment-8532</link>
		<dc:creator>Tumble Weed</dc:creator>
		<pubDate>Thu, 05 Aug 2010 15:30:55 +0000</pubDate>
		<guid isPermaLink="false">http://digitalize.ca/?p=570#comment-8532</guid>
		<description>Sooooooooooo much appreciated!!!!!</description>
		<content:encoded><![CDATA[<p>Sooooooooooo much appreciated!!!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://digitalize.ca/2010/02/jqtouch-tap-vs-click/comment-page-1/#comment-8168</link>
		<dc:creator>John</dc:creator>
		<pubDate>Wed, 07 Jul 2010 18:58:26 +0000</pubDate>
		<guid isPermaLink="false">http://digitalize.ca/?p=570#comment-8168</guid>
		<description>I run code on a real iPhone / iPod Touch / iPad, but also find that it&#039;s useful to run the same code in Safari (in emulation mode), and in the iPhone simulator (which seems not to handle tap!!??).

So I&#039;m doing something like this:

  var isRealMobile = (userAgent.indexOf(&#039;iphone&#039;) != -1 &#124;&#124;
    userAgent.indexOf(&#039;ipod&#039;) != -1 &#124;&#124;
    userAgent.indexOf(&#039;ipad&#039;) != -1) &amp;&amp;
      userAgent.indexOf(&#039;safari&#039;) == -1 &amp;&amp; userAgent.indexOf(&#039;simulator&#039;) == -1;
  var touchEvent = isRealMobile ? &#039;tap&#039; : &#039;click&#039;;

$(&quot;#something&quot;).bind(touchEvent, something);

Here are the user agent strings I looked at:

Safari emulating:
  Mozilla/5.0 (iPod; U; CPU iPhone OS 3_1_3 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7E18 Safari/528.16
  
Simulator:
  Mozilla/5.0 (iPhone Simulator; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Mobile/8A293

Real iPhone:  
Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Mobile/8A293</description>
		<content:encoded><![CDATA[<p>I run code on a real iPhone / iPod Touch / iPad, but also find that it&#8217;s useful to run the same code in Safari (in emulation mode), and in the iPhone simulator (which seems not to handle tap!!??).</p>
<p>So I&#8217;m doing something like this:</p>
<p>  var isRealMobile = (userAgent.indexOf(&#8216;iphone&#8217;) != -1 ||<br />
    userAgent.indexOf(&#8216;ipod&#8217;) != -1 ||<br />
    userAgent.indexOf(&#8216;ipad&#8217;) != -1) &amp;&amp;<br />
      userAgent.indexOf(&#8216;safari&#8217;) == -1 &amp;&amp; userAgent.indexOf(&#8216;simulator&#8217;) == -1;<br />
  var touchEvent = isRealMobile ? &#8216;tap&#8217; : &#8216;click&#8217;;</p>
<p>$(&#8220;#something&#8221;).bind(touchEvent, something);</p>
<p>Here are the user agent strings I looked at:</p>
<p>Safari emulating:<br />
  Mozilla/5.0 (iPod; U; CPU iPhone OS 3_1_3 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7E18 Safari/528.16</p>
<p>Simulator:<br />
  Mozilla/5.0 (iPhone Simulator; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Mobile/8A293</p>
<p>Real iPhone:<br />
Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Mobile/8A293</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rblon</title>
		<link>http://digitalize.ca/2010/02/jqtouch-tap-vs-click/comment-page-1/#comment-7775</link>
		<dc:creator>rblon</dc:creator>
		<pubDate>Tue, 11 May 2010 11:08:50 +0000</pubDate>
		<guid isPermaLink="false">http://digitalize.ca/?p=570#comment-7775</guid>
		<description>sorry for the formatting of my previous comment (I had included example html code).

It should say: 

It appears that if you have &quot;an anchor tag with href&quot;, that, with an Iphone....</description>
		<content:encoded><![CDATA[<p>sorry for the formatting of my previous comment (I had included example html code).</p>
<p>It should say: </p>
<p>It appears that if you have &#8220;an anchor tag with href&#8221;, that, with an Iphone&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rblon</title>
		<link>http://digitalize.ca/2010/02/jqtouch-tap-vs-click/comment-page-1/#comment-7774</link>
		<dc:creator>rblon</dc:creator>
		<pubDate>Tue, 11 May 2010 11:05:47 +0000</pubDate>
		<guid isPermaLink="false">http://digitalize.ca/?p=570#comment-7774</guid>
		<description>It appears that if you have &lt;a href=&quot;...&quot; rel=&quot;nofollow&quot;&gt; that, with an iPhone, tapping does activate the link, but not the click event. So 

&quot;You could just make things easy on yourself and use clicks across the board&quot;

actually doesn&#039;t hold (assuming you want the event handler to run). So to me it seems you always have to include this bit of code.</description>
		<content:encoded><![CDATA[<p>It appears that if you have &lt;a href=&#8221;&#8230;&#8221; rel=&#8221;nofollow&#8221;&gt; that, with an iPhone, tapping does activate the link, but not the click event. So </p>
<p>&#8220;You could just make things easy on yourself and use clicks across the board&#8221;</p>
<p>actually doesn&#8217;t hold (assuming you want the event handler to run). So to me it seems you always have to include this bit of code.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

