<?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: .click()</title>
	<atom:link href="http://api.jquery.com/click/feed/" rel="self" type="application/rss+xml" />
	<link>http://api.jquery.com/click/</link>
	<description>jQuery API Reference</description>
	<lastBuildDate>Sun, 14 Mar 2010 01:52:51 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: john</title>
		<link>http://api.jquery.com/click/comment-page-1/#comment-1024</link>
		<dc:creator>john</dc:creator>
		<pubDate>Mon, 15 Feb 2010 13:09:10 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=447#comment-1024</guid>
		<description>Inside a click() function the element clicked is available by using the variable &#039;this&#039;. Not mentioned above and perhaps not expected by some new to jquery/javascript&lt;br&gt;&lt;br&gt;$(&#039;.foo&#039;).click(function(){&lt;br&gt;    alert(this);&lt;br&gt;    alert($(this));&lt;br&gt;});</description>
		<content:encoded><![CDATA[<p>Inside a click() function the element clicked is available by using the variable &#39;this&#39;. Not mentioned above and perhaps not expected by some new to jquery/javascript</p>
<p>$(&#39;.foo&#39;).click(function(){<br />    alert(this);<br />    alert($(this));<br />});</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://api.jquery.com/click/comment-page-1/#comment-982</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Fri, 12 Feb 2010 21:31:36 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=447#comment-982</guid>
		<description>try adding the following code to prevent the browers default behaviour.&lt;br&gt;&lt;br&gt;event.preventDefault(); //stop default browser behaviour&lt;br&gt;&lt;br&gt;code example:&lt;br&gt;&lt;br&gt;$(&quot;a&quot;).click(function(event){&lt;br&gt;        event.preventDefault(); //stop default browser behaviour&lt;br&gt;        alert(&quot;This alert will be displayed without following the link&quot;);&lt;br&gt;});</description>
		<content:encoded><![CDATA[<p>try adding the following code to prevent the browers default behaviour.</p>
<p>event.preventDefault(); //stop default browser behaviour</p>
<p>code example:</p>
<p>$(&#8220;a&#8221;).click(function(event){<br />        event.preventDefault(); //stop default browser behaviour<br />        alert(&#8220;This alert will be displayed without following the link&#8221;);<br />});</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: System Exam</title>
		<link>http://api.jquery.com/click/comment-page-1/#comment-963</link>
		<dc:creator>System Exam</dc:creator>
		<pubDate>Fri, 12 Feb 2010 11:51:21 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=447#comment-963</guid>
		<description>How do I attach to click event not replace the contents in &quot;onClick&quot; event&lt;br&gt;ie.&lt;br&gt;&lt;a href=&quot;#&quot; onClick=&quot;alert(&#039;You Clicked&#039;);&quot;&gt;Click Me&lt;/a&gt;&lt;br&gt;if I attach event through jquery, it will replace my alert box. I want to keep my click events and attach more function executions through jquery!</description>
		<content:encoded><![CDATA[<p>How do I attach to click event not replace the contents in &#8220;onClick&#8221; event<br />ie.<br />&lt;a href=&#8221;#&#8221; onClick=&#8221;alert(&#39;You Clicked&#39;);&#8221;&gt;Click Me<br />if I attach event through jquery, it will replace my alert box. I want to keep my click events and attach more function executions through jquery!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leviath</title>
		<link>http://api.jquery.com/click/comment-page-1/#comment-949</link>
		<dc:creator>Leviath</dc:creator>
		<pubDate>Fri, 12 Feb 2010 05:16:03 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=447#comment-949</guid>
		<description>I give credit to another for this idea.&lt;br&gt;&lt;br&gt;An example of using binding instead of the click reference.&lt;br&gt;&lt;br&gt;Say you want to use a table cell, when clicked it jumps you over to a url.&lt;br&gt;&lt;br&gt;The markup:&lt;br&gt;-----&lt;br&gt;&lt;table&gt;&lt;br&gt;&lt;td link=&quot;http://api.jquery.com/click/&quot;&gt;Click this table cell to reference this page.&lt;/td&gt;&lt;br&gt;&lt;/table&gt;&lt;br&gt;&lt;br&gt;Then the jquery script:&lt;br&gt;-----&lt;br&gt;$(function(){&lt;br&gt;    $(&quot;tr[link]&quot;).bind(&quot;click&quot;, function(){&lt;br&gt;        var NewLink= $(this).attr(&quot;link&quot;);&lt;br&gt;        window.location.href = NewLink;&lt;br&gt;    });&lt;br&gt;});&lt;br&gt;&lt;br&gt;&lt;br&gt;Have fun :)</description>
		<content:encoded><![CDATA[<p>I give credit to another for this idea.</p>
<p>An example of using binding instead of the click reference.</p>
<p>Say you want to use a table cell, when clicked it jumps you over to a url.</p>
<p>The markup:<br />&#8212;&#8211;<br />&lt;table&gt;<br />&lt;td link=&#8221;http://api.jquery.com/click/&#8221;&gt;Click this table cell to reference this page.&lt;/td&gt;<br />&lt;/table&gt;</p>
<p>Then the jquery script:<br />&#8212;&#8211;<br />$(function(){<br />    $(&#8220;tr[link]&#8220;).bind(&#8220;click&#8221;, function(){<br />        var NewLink= $(this).attr(&#8220;link&#8221;);<br />        window.location.href = NewLink;<br />    });<br />});</p>
<p>Have fun <img src='http://api.jquery.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jujug42</title>
		<link>http://api.jquery.com/click/comment-page-1/#comment-905</link>
		<dc:creator>jujug42</dc:creator>
		<pubDate>Wed, 10 Feb 2010 08:03:21 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=447#comment-905</guid>
		<description>This is because of Event Bubbleing Propagation. This is not a bug. You can avoid this with the stopPropagation method of the event object (&lt;a href=&quot;http://api.jquery.com/event.stopPropagation/&quot; rel=&quot;nofollow&quot;&gt;http://api.jquery.com/event.stopPropagation/&lt;/a&gt;)</description>
		<content:encoded><![CDATA[<p>This is because of Event Bubbleing Propagation. This is not a bug. You can avoid this with the stopPropagation method of the event object (<a href="http://api.jquery.com/event.stopPropagation/" rel="nofollow">http://api.jquery.com/event.stopPropagation/</a>)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aandras72</title>
		<link>http://api.jquery.com/click/comment-page-1/#comment-722</link>
		<dc:creator>aandras72</dc:creator>
		<pubDate>Wed, 03 Feb 2010 12:16:49 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=447#comment-722</guid>
		<description>If you have a situation where you have defined a javascript function that attaches an event through the click function described here, and this function gets executed multiple times, will the function overwrite the click event or will it append to the click event. That is:&lt;br&gt;&lt;br&gt;$(&quot;a&quot;).click(fucntion() {&lt;br&gt;     doSomething();&lt;br&gt;}&lt;br&gt;&lt;br&gt;Suppose this gets executed multiple times (say 3 times). Will the result be a call to doSomething() once, or doSomething() three times?&lt;br&gt;&lt;br&gt;Thanks in advance!</description>
		<content:encoded><![CDATA[<p>If you have a situation where you have defined a javascript function that attaches an event through the click function described here, and this function gets executed multiple times, will the function overwrite the click event or will it append to the click event. That is:</p>
<p>$(&#8220;a&#8221;).click(fucntion() {<br />     doSomething();<br />}</p>
<p>Suppose this gets executed multiple times (say 3 times). Will the result be a call to doSomething() once, or doSomething() three times?</p>
<p>Thanks in advance!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bri Lance</title>
		<link>http://api.jquery.com/click/comment-page-1/#comment-697</link>
		<dc:creator>Bri Lance</dc:creator>
		<pubDate>Tue, 02 Feb 2010 20:21:26 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=447#comment-697</guid>
		<description>It&#039;s important to remember that click() will not trigger the default behavior on a link, even if nothing else is preventing it.  So you can&#039;t use click() by itself to simulate the user clicking on a link and being taken to another url.</description>
		<content:encoded><![CDATA[<p>It&#39;s important to remember that click() will not trigger the default behavior on a link, even if nothing else is preventing it.  So you can&#39;t use click() by itself to simulate the user clicking on a link and being taken to another url.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bobbykjack</title>
		<link>http://api.jquery.com/click/comment-page-1/#comment-176</link>
		<dc:creator>bobbykjack</dc:creator>
		<pubDate>Fri, 15 Jan 2010 10:15:16 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=447#comment-176</guid>
		<description>According to my testing, under Firefox 3, this event also fires on a submit button when that button&#039;s form is submitted, even if it&#039;s submitted via the keyboard. This is quite non-intuitive, so be sure it doesn&#039;t catch you out!</description>
		<content:encoded><![CDATA[<p>According to my testing, under Firefox 3, this event also fires on a submit button when that button&#39;s form is submitted, even if it&#39;s submitted via the keyboard. This is quite non-intuitive, so be sure it doesn&#39;t catch you out!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
