<?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: Questions and Answers from the List</title>
	<atom:link href="http://www.learningjquery.com/2007/12/questions-and-answers-from-the-list/feed" rel="self" type="application/rss+xml" />
	<link>http://www.learningjquery.com/2007/12/questions-and-answers-from-the-list</link>
	<description>Tips, techniques, and tutorials for the jQuery JavaScript library</description>
	<lastBuildDate>Sun, 14 Mar 2010 16:12:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: tabldot yemek</title>
		<link>http://www.learningjquery.com/2007/12/questions-and-answers-from-the-list/comment-page-1#comment-78979</link>
		<dc:creator>tabldot yemek</dc:creator>
		<pubDate>Thu, 01 Oct 2009 19:46:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2007/12/questions-and-answers-from-the-list#comment-78979</guid>
		<description>Thanks for all your very useful post all the same</description>
		<content:encoded><![CDATA[<p>Thanks for all your very useful post all the same</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lazer epilasyon</title>
		<link>http://www.learningjquery.com/2007/12/questions-and-answers-from-the-list/comment-page-1#comment-72787</link>
		<dc:creator>lazer epilasyon</dc:creator>
		<pubDate>Tue, 07 Apr 2009 13:36:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2007/12/questions-and-answers-from-the-list#comment-72787</guid>
		<description>very useful page! thanks</description>
		<content:encoded><![CDATA[<p>very useful page! thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Drumsticks</title>
		<link>http://www.learningjquery.com/2007/12/questions-and-answers-from-the-list/comment-page-1#comment-65382</link>
		<dc:creator>Drumsticks</dc:creator>
		<pubDate>Wed, 11 Feb 2009 06:07:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2007/12/questions-and-answers-from-the-list#comment-65382</guid>
		<description>I, too, am having the same issue as DeaR.

I keep getting &quot;Missing } in XML expression.&quot;  I looked over my JS code quite a bit, but can&#039;t seem to find anything wrong with it.  
It happens during the execution of the post function.

Has anyone experienced this or may have any possible solution to this problem?  

Thanks.</description>
		<content:encoded><![CDATA[<p>I, too, am having the same issue as DeaR.</p>
<p>I keep getting &#8220;Missing } in XML expression.&#8221;  I looked over my JS code quite a bit, but can&#8217;t seem to find anything wrong with it.<br />
It happens during the execution of the post function.</p>
<p>Has anyone experienced this or may have any possible solution to this problem?  </p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karl Swedberg</title>
		<link>http://www.learningjquery.com/2007/12/questions-and-answers-from-the-list/comment-page-1#comment-63734</link>
		<dc:creator>Karl Swedberg</dc:creator>
		<pubDate>Thu, 04 Dec 2008 13:20:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2007/12/questions-and-answers-from-the-list#comment-63734</guid>
		<description>Good catch, Rodrigue! I updated the post with the fixed code.</description>
		<content:encoded><![CDATA[<p>Good catch, Rodrigue! I updated the post with the fixed code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rodrigue</title>
		<link>http://www.learningjquery.com/2007/12/questions-and-answers-from-the-list/comment-page-1#comment-63733</link>
		<dc:creator>Rodrigue</dc:creator>
		<pubDate>Thu, 04 Dec 2008 12:25:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2007/12/questions-and-answers-from-the-list#comment-63733</guid>
		<description>Hi Karl,

very good post and quite useful to me as I was today trying to center an image on the screen, which is exactly what the answer to  How to Center a DIV Vertically in the Viewport does. 

However the code snippet above has a syntax error. Line 17 should be removed,  otherwise the curly bracket terminates the definition of vCenter. The code is correct on the jquery.vcenter.js used in the example page though.

Thanks for all your very useful post all the same</description>
		<content:encoded><![CDATA[<p>Hi Karl,</p>
<p>very good post and quite useful to me as I was today trying to center an image on the screen, which is exactly what the answer to  How to Center a DIV Vertically in the Viewport does. </p>
<p>However the code snippet above has a syntax error. Line 17 should be removed,  otherwise the curly bracket terminates the definition of vCenter. The code is correct on the jquery.vcenter.js used in the example page though.</p>
<p>Thanks for all your very useful post all the same</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adeel Shahid</title>
		<link>http://www.learningjquery.com/2007/12/questions-and-answers-from-the-list/comment-page-1#comment-63688</link>
		<dc:creator>Adeel Shahid</dc:creator>
		<pubDate>Wed, 26 Nov 2008 02:03:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2007/12/questions-and-answers-from-the-list#comment-63688</guid>
		<description>Thanks Karl for the above comment but i was wondering a method outside jQuery in simple javascript,

while here&#039;s a tribute to you, my first jQuery plugin - ripped from your post


jQuery.fn.centerMe = function() {
	
	var sTop = function() {
		return window.pageYOffset &#124;&#124; document.documentElement &amp;&amp; document.documentElement.scrollTop &#124;&#124; document.body.scrollTop;
	}
	
	var sLeft = function() {
		return window.pageXOffset &#124;&#124; document.documentElement &amp;&amp; document.documentElement.scrollLeft &#124;&#124; document.body.scrollLeft;
	}
	
	var iHeight = function() {
		return window.innerHeight &#124;&#124; document.documentElement &amp;&amp; document.documentElement.clientHeight &#124;&#124; document.body.clientHeight;
	}
	
	var iWidth = function() {
		return window.innerWidth &#124;&#124; document.documentElement &amp;&amp; document.documentElement.clientWidth &#124;&#124; document.body.clientWidth;
	}
	
	return this.each(function(index) {
		var elmWidth = $(this).width();
		var elmHeight = $(this).height();
		var scrollTop = sTop();
		var scrollLeft = sLeft();
		var innerHeight = iHeight();
		var innerWidth = iWidth();
		
		var top = scrollTop + (innerHeight / 2) - (elmHeight / 2);
		var left = scrollLeft + (innerWidth / 2) - (elmWidth / 2);
		
		$(this).css({
					&#039;position&#039;:&#039;absolute&#039;,
					&#039;top&#039;:top,
					&#039;left&#039;:left
					});
					
	});
}</description>
		<content:encoded><![CDATA[<p>Thanks Karl for the above comment but i was wondering a method outside jQuery in simple javascript,</p>
<p>while here&#8217;s a tribute to you, my first jQuery plugin &#8211; ripped from your post</p>
<p>jQuery.fn.centerMe = function() {</p>
<p>	var sTop = function() {<br />
		return window.pageYOffset || document.documentElement &amp;&amp; document.documentElement.scrollTop || document.body.scrollTop;<br />
	}</p>
<p>	var sLeft = function() {<br />
		return window.pageXOffset || document.documentElement &amp;&amp; document.documentElement.scrollLeft || document.body.scrollLeft;<br />
	}</p>
<p>	var iHeight = function() {<br />
		return window.innerHeight || document.documentElement &amp;&amp; document.documentElement.clientHeight || document.body.clientHeight;<br />
	}</p>
<p>	var iWidth = function() {<br />
		return window.innerWidth || document.documentElement &amp;&amp; document.documentElement.clientWidth || document.body.clientWidth;<br />
	}</p>
<p>	return this.each(function(index) {<br />
		var elmWidth = $(this).width();<br />
		var elmHeight = $(this).height();<br />
		var scrollTop = sTop();<br />
		var scrollLeft = sLeft();<br />
		var innerHeight = iHeight();<br />
		var innerWidth = iWidth();</p>
<p>		var top = scrollTop + (innerHeight / 2) &#8211; (elmHeight / 2);<br />
		var left = scrollLeft + (innerWidth / 2) &#8211; (elmWidth / 2);</p>
<p>		$(this).css({<br />
					&#8216;position&#8217;:'absolute&#8217;,<br />
					&#8216;top&#8217;:top,<br />
					&#8216;left&#8217;:left<br />
					});</p>
<p>	});<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karl Swedberg</title>
		<link>http://www.learningjquery.com/2007/12/questions-and-answers-from-the-list/comment-page-1#comment-63683</link>
		<dc:creator>Karl Swedberg</dc:creator>
		<pubDate>Tue, 25 Nov 2008 04:29:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2007/12/questions-and-answers-from-the-list#comment-63683</guid>
		<description>Hi Adeel. Try &lt;code&gt;$(document).height();&lt;/code&gt;.</description>
		<content:encoded><![CDATA[<p>Hi Adeel. Try <code>$(document).height();</code>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adeel Shahid</title>
		<link>http://www.learningjquery.com/2007/12/questions-and-answers-from-the-list/comment-page-1#comment-63682</link>
		<dc:creator>Adeel Shahid</dc:creator>
		<pubDate>Tue, 25 Nov 2008 03:25:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2007/12/questions-and-answers-from-the-list#comment-63682</guid>
		<description>Is there a way by which I can find out the exact height of my webpage not the clientHeight from the quirks mode but the height which is cross browser compatible.

But exact height I mean the complete height above the top scrolled area, area viewable and the area below which is yet to be scrolled.</description>
		<content:encoded><![CDATA[<p>Is there a way by which I can find out the exact height of my webpage not the clientHeight from the quirks mode but the height which is cross browser compatible.</p>
<p>But exact height I mean the complete height above the top scrolled area, area viewable and the area below which is yet to be scrolled.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Maniquí</title>
		<link>http://www.learningjquery.com/2007/12/questions-and-answers-from-the-list/comment-page-1#comment-63359</link>
		<dc:creator>Maniquí</dc:creator>
		<pubDate>Sat, 25 Oct 2008 03:00:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2007/12/questions-and-answers-from-the-list#comment-63359</guid>
		<description>Well, I&#039;ve spotted a little bug in my approach (see comment above).
Because of the way jquery.vcenter calculates the value for elTop, it can result on a negative value. Then, that negative value can&#039;t be used on paddingTop, because padding cannot have negative values.
The workaround is easy. If elTop &lt; 0, then set it to equal 0.
Like this:

&lt;code&gt;
[...]
var elTop = pos.sTop() + (pos.wHeight() / 2) - (elHeight / 2);
if (elTop &lt; 0) {
	var elTop = 0;
};
$this.css({
  //position: &#039;absolute&#039;,
  //marginTop: elTop,
  paddingTop: elTop
  //top: elTop
});
[...]
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Well, I&#8217;ve spotted a little bug in my approach (see comment above).<br />
Because of the way jquery.vcenter calculates the value for elTop, it can result on a negative value. Then, that negative value can&#8217;t be used on paddingTop, because padding cannot have negative values.<br />
The workaround is easy. If elTop &lt; 0, then set it to equal 0.<br />
Like this:</p>
<p><code><br />
[...]<br />
var elTop = pos.sTop() + (pos.wHeight() / 2) - (elHeight / 2);<br />
if (elTop &lt; 0) {<br />
	var elTop = 0;<br />
};<br />
$this.css({<br />
  //position: 'absolute',<br />
  //marginTop: elTop,<br />
  paddingTop: elTop<br />
  //top: elTop<br />
});<br />
[...]<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Maniquí</title>
		<link>http://www.learningjquery.com/2007/12/questions-and-answers-from-the-list/comment-page-1#comment-54829</link>
		<dc:creator>Maniquí</dc:creator>
		<pubDate>Sat, 06 Sep 2008 18:35:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2007/12/questions-and-answers-from-the-list#comment-54829</guid>
		<description>I was having some issues with the vertical center plugin on IE7.
For some reason, the content was succesfully being vertically centered, but also the width of the window was expanding (and so, adding an horizontal scroll bar).

Finally, I did some changes in the plugin code and was able to fix it. 
The changes are this:

&lt;code&gt;          //position: &#039;absolute&#039;,
          //marginTop: elTop,
		  paddingTop: elTop
          //top: elTop
&lt;/code&gt;

As you can see, I commented out some lines and added the paddingTop.
So far, it worked for me (on a particular situation) on IE6/7/Win, FF3, Safari/Win, Google Chrome.

But, the question is: could you foreseen any problem with this change? 
Thanks.</description>
		<content:encoded><![CDATA[<p>I was having some issues with the vertical center plugin on IE7.<br />
For some reason, the content was succesfully being vertically centered, but also the width of the window was expanding (and so, adding an horizontal scroll bar).</p>
<p>Finally, I did some changes in the plugin code and was able to fix it.<br />
The changes are this:</p>
<p><code>          //position: 'absolute',<br />
          //marginTop: elTop,<br />
		  paddingTop: elTop<br />
          //top: elTop<br />
</code></p>
<p>As you can see, I commented out some lines and added the paddingTop.<br />
So far, it worked for me (on a particular situation) on IE6/7/Win, FF3, Safari/Win, Google Chrome.</p>
<p>But, the question is: could you foreseen any problem with this change?<br />
Thanks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
