<?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>zXc developments &#187; jQuery</title>
	<atom:link href="http://www.zxcdev.com/topics/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zxcdev.com</link>
	<description>Enveloped by Code</description>
	<lastBuildDate>Mon, 24 May 2010 22:41:17 +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 Click/Double Click</title>
		<link>http://www.zxcdev.com/2009/05/jquery-click-double-click/</link>
		<comments>http://www.zxcdev.com/2009/05/jquery-click-double-click/#comments</comments>
		<pubDate>Mon, 04 May 2009 10:13:05 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://zxcdev.com/?p=4</guid>
		<description><![CDATA[The battle of the standards is constantly a struggle. I found myself needing a solution to the jQuery Click/Double Click problem. This example will send one click or double click to the helper functions. Compatible with Firefox and IE &#62; 6. var clicktimer; var e_click; var id_click; &#160; $&#40;/* Your Sender */&#41;.click&#40;function&#40;ev&#41; &#123; var browser=navigator.appName; [...]]]></description>
			<content:encoded><![CDATA[<p>The battle of the standards is constantly a struggle. I found myself needing a solution to the jQuery Click/Double Click problem. This example will send one click or double click to the helper functions. Compatible with Firefox and IE &gt; 6.</p>
<p><span id="more-4"></span></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> clicktimer<span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> e_click<span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> id_click<span style="color: #339933;">;</span>
&nbsp;
$<span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/* Your Sender */</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>ev<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> browser<span style="color: #339933;">=</span>navigator.<span style="color: #660066;">appName</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> b_version<span style="color: #339933;">=</span>navigator.<span style="color: #660066;">appVersion</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> version<span style="color: #339933;">=</span>parseFloat<span style="color: #009900;">&#40;</span>b_version<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>browser<span style="color: #339933;">==</span><span style="color: #3366CC;">&quot;Microsoft Internet Explorer&quot;</span><span style="color: #009900;">&#41;</span>
       <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span>version<span style="color: #339933;">==</span><span style="color: #CC0000;">6</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #006600; font-style: italic;">//Just do the primary action</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000066; font-weight: bold;">else</span>
    <span style="color: #009900;">&#123;</span>
        e_click <span style="color: #339933;">=</span> ev<span style="color: #339933;">;</span>
        id_click <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">id</span><span style="color: #339933;">;</span>
        clicktimer <span style="color: #339933;">=</span> window.<span style="color: #660066;">setTimeout</span><span style="color: #009900;">&#40;</span>
            <span style="color: #3366CC;">&quot;if(e_click)
            {
                SingleClickAction();
                clearTimeout(clicktimer);
                clicktimer = null;
            }&quot;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">300</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">dblclick</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>ev<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>        
    window.<span style="color: #660066;">clearTimeout</span><span style="color: #009900;">&#40;</span>clicktimer<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>        
    e_click <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
    id_click <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
    DoubleClickAction<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>    
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> SingleClickAction<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
   <span style="color: #006600; font-style: italic;">//Do Something</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #003366; font-weight: bold;">function</span> DoubleClickAction<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
   <span style="color: #006600; font-style: italic;">//Do Something</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.zxcdev.com/2009/05/jquery-click-double-click/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
