<?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: Introducing $(document).ready()</title>
	<atom:link href="http://www.learningjquery.com/2006/09/introducing-document-ready/feed" rel="self" type="application/rss+xml" />
	<link>http://www.learningjquery.com/2006/09/introducing-document-ready</link>
	<description>Tips, techniques, and tutorials for the jQuery JavaScript library</description>
	<lastBuildDate>Fri, 03 Feb 2012 13:58:02 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Jared - Regina Web Design</title>
		<link>http://www.learningjquery.com/2006/09/introducing-document-ready/comment-page-2#comment-85736</link>
		<dc:creator>Jared - Regina Web Design</dc:creator>
		<pubDate>Fri, 30 Dec 2011 02:13:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2006/09/introducing-document-ready#comment-85736</guid>
		<description>Good read, but a small correction, you can have mutliple functions in the onload in a body tag...

&lt;code&gt;&lt;body onload=&quot;this();that();anotherOne()&quot;&gt;&lt;/code&gt;

This works fine, but yes, it does add extra markup</description>
		<content:encoded><![CDATA[<p>Good read, but a small correction, you can have mutliple functions in the onload in a body tag&#8230;</p>
<p><code>&lt;body onload="this();that();anotherOne()"&gt;</code></p>
<p>This works fine, but yes, it does add extra markup</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pete</title>
		<link>http://www.learningjquery.com/2006/09/introducing-document-ready/comment-page-2#comment-84380</link>
		<dc:creator>Pete</dc:creator>
		<pubDate>Tue, 06 Sep 2011 19:28:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2006/09/introducing-document-ready#comment-84380</guid>
		<description>Karl &amp; Jörn (first commenter) - Many thanks for the explanation - I just inherited some web code that had the javascript $(document).ready code and the shorter version.  It was great to see that they are one and the same.</description>
		<content:encoded><![CDATA[<p>Karl &amp; Jörn (first commenter) &#8211; Many thanks for the explanation &#8211; I just inherited some web code that had the javascript $(document).ready code and the shorter version.  It was great to see that they are one and the same.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karl Swedberg</title>
		<link>http://www.learningjquery.com/2006/09/introducing-document-ready/comment-page-2#comment-84360</link>
		<dc:creator>Karl Swedberg</dc:creator>
		<pubDate>Fri, 02 Sep 2011 13:16:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2006/09/introducing-document-ready#comment-84360</guid>
		<description>I&#039;m guessing that you&#039;re binding a click handler to links (&lt;code&gt;&lt;a&gt;&lt;/code&gt;). If so, you need to either return &lt;code&gt;false&lt;/code&gt; at the end of the function or pass in the event object and call &lt;code&gt;event.preventDefault()&lt;/code&gt;.

Your code should look something like this:

&lt;pre&gt;&lt;code&gt;$(&#039;findSomething&#039;).bind(&#039;click&#039;, function() {
  // do something
  return false;
});&lt;/code&gt;&lt;/pre&gt;

or like this:

&lt;pre&gt;&lt;code&gt;$(&#039;findSomething&#039;).bind(&#039;click&#039;, function(event) {
  event.preventDefault();
  // do something
});&lt;/code&gt;&lt;/pre&gt;

You will, of course, need to replace &lt;code&gt;&#039;findSomething&#039;&lt;/code&gt; with the real selector and replace the &lt;code&gt;// do something&lt;/code&gt; comment with your real code.

p.s. Looks like you didn&#039;t escape the &lt; and &gt; in your comment.</description>
		<content:encoded><![CDATA[<p>I&#8217;m guessing that you&#8217;re binding a click handler to links (<code>&lt;a&gt;</code>). If so, you need to either return <code>false</code> at the end of the function or pass in the event object and call <code>event.preventDefault()</code>.</p>
<p>Your code should look something like this:</p>
<pre><code>$('findSomething').bind('click', function() {
  // do something
  return false;
});</code></pre>
<p>or like this:</p>
<pre><code>$('findSomething').bind('click', function(event) {
  event.preventDefault();
  // do something
});</code></pre>
<p>You will, of course, need to replace <code>'findSomething'</code> with the real selector and replace the <code>// do something</code> comment with your real code.</p>
<p>p.s. Looks like you didn&#8217;t escape the &lt; and &gt; in your comment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://www.learningjquery.com/2006/09/introducing-document-ready/comment-page-2#comment-84358</link>
		<dc:creator>David</dc:creator>
		<pubDate>Fri, 02 Sep 2011 11:33:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2006/09/introducing-document-ready#comment-84358</guid>
		<description>Hi, i use buttons with . Alwaays when clicked on one of these buttons, the document.ready is executed again (FF and IE). Is there a way to get rid of the repeated execution?</description>
		<content:encoded><![CDATA[<p>Hi, i use buttons with . Alwaays when clicked on one of these buttons, the document.ready is executed again (FF and IE). Is there a way to get rid of the repeated execution?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pierre</title>
		<link>http://www.learningjquery.com/2006/09/introducing-document-ready/comment-page-2#comment-84353</link>
		<dc:creator>Pierre</dc:creator>
		<pubDate>Mon, 29 Aug 2011 15:30:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2006/09/introducing-document-ready#comment-84353</guid>
		<description>Hi Billy,

The document.ready() fires when your DOM (your webpage tree) is loaded, but not the content of your page.

Therefore, the window.load() function fires when everything on your page has been loaded.

So you can use the first one when you&#039;re manipulating text, css and html, but you absolutely have to use the second one when you manipulate heavy stuff such as pictures.

I hope i &#039;d been helpful.</description>
		<content:encoded><![CDATA[<p>Hi Billy,</p>
<p>The document.ready() fires when your DOM (your webpage tree) is loaded, but not the content of your page.</p>
<p>Therefore, the window.load() function fires when everything on your page has been loaded.</p>
<p>So you can use the first one when you&#8217;re manipulating text, css and html, but you absolutely have to use the second one when you manipulate heavy stuff such as pictures.</p>
<p>I hope i &#8216;d been helpful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pierre</title>
		<link>http://www.learningjquery.com/2006/09/introducing-document-ready/comment-page-2#comment-84352</link>
		<dc:creator>Pierre</dc:creator>
		<pubDate>Mon, 29 Aug 2011 15:25:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2006/09/introducing-document-ready#comment-84352</guid>
		<description>Hi Rob,
you have to call your &#039;jQuery Goodness&#039; inside a $(document).ready or $(window).load depending of your goodness.

But your functions can be far away from this tags.

This is an exemple :
&lt;code&gt;
function putText(){
$(body).html(&#039;hello world!&#039;);
}

$(document).ready(function(){
putText();
});
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Hi Rob,<br />
you have to call your &#8216;jQuery Goodness&#8217; inside a $(document).ready or $(window).load depending of your goodness.</p>
<p>But your functions can be far away from this tags.</p>
<p>This is an exemple :<br />
<code><br />
function putText(){<br />
$(body).html('hello world!');<br />
}</p>
<p>$(document).ready(function(){<br />
putText();<br />
});<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob Phillips</title>
		<link>http://www.learningjquery.com/2006/09/introducing-document-ready/comment-page-2#comment-83727</link>
		<dc:creator>Rob Phillips</dc:creator>
		<pubDate>Tue, 24 May 2011 14:50:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2006/09/introducing-document-ready#comment-83727</guid>
		<description>Sorry, I tried to read all the comments, to see if my question had already been asked, but my eyes started to burn...lol

Just wondering, when it was said &quot;all your jQuery goodness here&quot;, does that mean that I need to structure my code so that every function that I have created that uses a jQuery method or function should go inside the .ready()?</description>
		<content:encoded><![CDATA[<p>Sorry, I tried to read all the comments, to see if my question had already been asked, but my eyes started to burn&#8230;lol</p>
<p>Just wondering, when it was said &#8220;all your jQuery goodness here&#8221;, does that mean that I need to structure my code so that every function that I have created that uses a jQuery method or function should go inside the .ready()?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ankit</title>
		<link>http://www.learningjquery.com/2006/09/introducing-document-ready/comment-page-2#comment-83663</link>
		<dc:creator>Ankit</dc:creator>
		<pubDate>Fri, 29 Apr 2011 11:54:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2006/09/introducing-document-ready#comment-83663</guid>
		<description>After some googleing....
There is no difference.

$ is the same as jQuery. If you view the unminified source, you will see var $ = jQuery = ... or something to that effect.

The jQuery function checks the type of it&#039;s parameter, if it is a function, it treats it the same as $(document).ready(...)

Calling jQuery without a parameter defaults to using document. So $() and $(document) are identical. Try it in Firebug.</description>
		<content:encoded><![CDATA[<p>After some googleing&#8230;.<br />
There is no difference.</p>
<p>$ is the same as jQuery. If you view the unminified source, you will see var $ = jQuery = &#8230; or something to that effect.</p>
<p>The jQuery function checks the type of it&#8217;s parameter, if it is a function, it treats it the same as $(document).ready(&#8230;)</p>
<p>Calling jQuery without a parameter defaults to using document. So $() and $(document) are identical. Try it in Firebug.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Billy bureua</title>
		<link>http://www.learningjquery.com/2006/09/introducing-document-ready/comment-page-2#comment-83571</link>
		<dc:creator>Billy bureua</dc:creator>
		<pubDate>Sat, 19 Mar 2011 21:35:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2006/09/introducing-document-ready#comment-83571</guid>
		<description>What is the difference in the whole  documentReady versus window/document.load? And what&#039;s this business that the javascript calls should be put just above the closing html tag so that all is loaded before the javascript.

I&#039;ve heard the document.onLoad is what is really needed to actually manipulate any elements on the page once they are actually available?</description>
		<content:encoded><![CDATA[<p>What is the difference in the whole  documentReady versus window/document.load? And what&#8217;s this business that the javascript calls should be put just above the closing html tag so that all is loaded before the javascript.</p>
<p>I&#8217;ve heard the document.onLoad is what is really needed to actually manipulate any elements on the page once they are actually available?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: &#187; Ensuring JavaScript Is Enabled Before Displaying Content On A Web Page dougv.com « Doug Vanderweide</title>
		<link>http://www.learningjquery.com/2006/09/introducing-document-ready/comment-page-2#comment-83493</link>
		<dc:creator>&#187; Ensuring JavaScript Is Enabled Before Displaying Content On A Web Page dougv.com « Doug Vanderweide</dc:creator>
		<pubDate>Fri, 18 Feb 2011 13:06:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2006/09/introducing-document-ready#comment-83493</guid>
		<description>[...] syntax for jQuery. If you are using jQuery, you can use $(document).ready() instead of the body&#8217;s onload event and the checkJS() function. All you need to do is add this [...]</description>
		<content:encoded><![CDATA[<p>[...] syntax for jQuery. If you are using jQuery, you can use $(document).ready() instead of the body&#8217;s onload event and the checkJS() function. All you need to do is add this [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced (User agent is rejected)
Database Caching 8/22 queries in 0.008 seconds using disk: basic
Object Caching 371/380 objects using disk: basic
Content Delivery Network via learningjquery.kswedberg.netdna-cdn.com

Served from: www.learningjquery.com @ 2012-02-03 22:27:48 -->
