<?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: Vertical-Align : Middle Using Javascript : JQuery &amp; Mootools</title>
	<atom:link href="http://www.nitinh.com/2010/01/vertical-align-middle-using-javascript-jquery-mootools/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nitinh.com/2010/01/vertical-align-middle-using-javascript-jquery-mootools/</link>
	<description>Nitin Hayaran&#039;s Blog</description>
	<lastBuildDate>Fri, 10 Feb 2012 02:42:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: Nathan B</title>
		<link>http://www.nitinh.com/2010/01/vertical-align-middle-using-javascript-jquery-mootools/comment-page-1/#comment-14468</link>
		<dc:creator>Nathan B</dc:creator>
		<pubDate>Fri, 01 Apr 2011 14:18:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.nitinh.com/?p=345#comment-14468</guid>
		<description>I found 3-4 other plugins first and tried them and they failed me, and I was about to give up, and then I found this and it worked! Huge thanks.</description>
		<content:encoded><![CDATA[<p>I found 3-4 other plugins first and tried them and they failed me, and I was about to give up, and then I found this and it worked! Huge thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Larsson</title>
		<link>http://www.nitinh.com/2010/01/vertical-align-middle-using-javascript-jquery-mootools/comment-page-1/#comment-8218</link>
		<dc:creator>Larsson</dc:creator>
		<pubDate>Tue, 07 Sep 2010 15:42:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.nitinh.com/?p=345#comment-8218</guid>
		<description>I&#039;m just about to try this, I have very little experience with javascript, if you could add the code for browser resize I&#039;d be be hugely grateful.

Can this be applied to vertically centering a website within the browser aswell? If not could you direct me to a script that can. Thanks</description>
		<content:encoded><![CDATA[<p>I&#8217;m just about to try this, I have very little experience with javascript, if you could add the code for browser resize I&#8217;d be be hugely grateful.</p>
<p>Can this be applied to vertically centering a website within the browser aswell? If not could you direct me to a script that can. Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nitin</title>
		<link>http://www.nitinh.com/2010/01/vertical-align-middle-using-javascript-jquery-mootools/comment-page-1/#comment-7579</link>
		<dc:creator>nitin</dc:creator>
		<pubDate>Wed, 14 Jul 2010 17:46:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.nitinh.com/?p=345#comment-7579</guid>
		<description>for getting this effect you&#039;ll have to handle &quot;on-resize&quot; event. Just call this function onresize as well.</description>
		<content:encoded><![CDATA[<p>for getting this effect you&#8217;ll have to handle &#8220;on-resize&#8221; event. Just call this function onresize as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bradley Hilton</title>
		<link>http://www.nitinh.com/2010/01/vertical-align-middle-using-javascript-jquery-mootools/comment-page-1/#comment-7539</link>
		<dc:creator>Bradley Hilton</dc:creator>
		<pubDate>Wed, 14 Jul 2010 01:45:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.nitinh.com/?p=345#comment-7539</guid>
		<description>How would you go around making it resize again when the browser is changed? I&#039;m not that much of a javascript person (jquery or mootools) and so I&#039;m just very curious about how you could go about doing that. Thanks</description>
		<content:encoded><![CDATA[<p>How would you go around making it resize again when the browser is changed? I&#8217;m not that much of a javascript person (jquery or mootools) and so I&#8217;m just very curious about how you could go about doing that. Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nitin</title>
		<link>http://www.nitinh.com/2010/01/vertical-align-middle-using-javascript-jquery-mootools/comment-page-1/#comment-4536</link>
		<dc:creator>nitin</dc:creator>
		<pubDate>Sun, 17 Jan 2010 17:04:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.nitinh.com/?p=345#comment-4536</guid>
		<description>Sorry there was small typo error in the JQuery Code ( ****ing wordpress auto format ).

Anyways now I&#039;ve updated the code. Go through it, the changes are in wrapAll function.

The answer to all of your questions lies in jQuery Documentation. Just walk through the docs and I am sure you won&#039;t have any confusion. 

http://docs.jquery.com/Plugins/Authoring#Custom_Alias_in_plugin_code
http://docs.jquery.com/Core/each#callback</description>
		<content:encoded><![CDATA[<p>Sorry there was small typo error in the JQuery Code ( ****ing wordpress auto format ).</p>
<p>Anyways now I&#8217;ve updated the code. Go through it, the changes are in wrapAll function.</p>
<p>The answer to all of your questions lies in jQuery Documentation. Just walk through the docs and I am sure you won&#8217;t have any confusion. </p>
<p><a href="http://docs.jquery.com/Plugins/Authoring#Custom_Alias_in_plugin_code" rel="nofollow">http://docs.jquery.com/Plugins/Authoring#Custom_Alias_in_plugin_code</a><br />
<a href="http://docs.jquery.com/Core/each#callback" rel="nofollow">http://docs.jquery.com/Core/each#callback</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lbo</title>
		<link>http://www.nitinh.com/2010/01/vertical-align-middle-using-javascript-jquery-mootools/comment-page-1/#comment-4532</link>
		<dc:creator>lbo</dc:creator>
		<pubDate>Sun, 17 Jan 2010 11:28:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.nitinh.com/?p=345#comment-4532</guid>
		<description>I&#039;ll be very grateful if you could give some line-by-line comment on your plugin.  

I could have it working by copy and paste, but not knowing why it work makes me uncomfortable.  I know it&#039;s a matter of basic js syntax, still I was not able to get it through once for all.

now:

// so, here you say &quot;let&#039;s start a function that will fire 
// when all the dom is ready&quot;, correct?
(function ($) {

// now you&#039;re saying &quot;I&#039;m defining a function called fn.vAlign&quot;.
// the arguments for this function would be...  what?
$.fn.vAlign = function() {

// ...an array of arguments (i), and the function will &quot;walk&quot; through 
// all those arguments.  Or are you going to generate an array of functions?
	return this.each(function(i){

// here, what does it mean (this)?  the element i?  
// so the line below says &quot;get all the children of the element wrapAll
// that are inside element i?
// And why there&#039;s nothing inside the &#039;&#039; of wrapAll(&#039;&#039;)?
        $(this).children().wrapAll(&#039;
 
&#039;);

// ok, here you say &quot;assign to var div the children called &#039;div.nitinh-vAlign&#039;
// of the element (this)?
        var div = $(this).children(&#039;div.nitinh-vAlign&#039;);

// ok, that make me think that (this) can be one of the generic (i) elements
// we are walking the fn.vAlign with, am I correct?
        var ph = $(this).innerHeight();

// no problem with these two...
        var dh = div.height();
        var mh = (ph - dh) / 2;

// and now you place the element corresponding to var div &quot;halfway&quot;
// respect to (this).  but here (this) can be one of the many (i) we&#039;re
// passing
        div.css(&#039;top&#039;, mh);
	});
};

// why you end up with (jQuery)?
})(jQuery);

many thanks if you&#039;ll have the time to answer to some of these very trivial question, it would be helpful to me in getting to understand how these js frameworks work.</description>
		<content:encoded><![CDATA[<p>I&#8217;ll be very grateful if you could give some line-by-line comment on your plugin.  </p>
<p>I could have it working by copy and paste, but not knowing why it work makes me uncomfortable.  I know it&#8217;s a matter of basic js syntax, still I was not able to get it through once for all.</p>
<p>now:</p>
<p>// so, here you say &#8220;let&#8217;s start a function that will fire<br />
// when all the dom is ready&#8221;, correct?<br />
(function ($) {</p>
<p>// now you&#8217;re saying &#8220;I&#8217;m defining a function called fn.vAlign&#8221;.<br />
// the arguments for this function would be&#8230;  what?<br />
$.fn.vAlign = function() {</p>
<p>// &#8230;an array of arguments (i), and the function will &#8220;walk&#8221; through<br />
// all those arguments.  Or are you going to generate an array of functions?<br />
	return this.each(function(i){</p>
<p>// here, what does it mean (this)?  the element i?<br />
// so the line below says &#8220;get all the children of the element wrapAll<br />
// that are inside element i?<br />
// And why there&#8217;s nothing inside the &#8221; of wrapAll(&#8221;)?<br />
        $(this).children().wrapAll(&#8216;</p>
<p>&#8216;);</p>
<p>// ok, here you say &#8220;assign to var div the children called &#8216;div.nitinh-vAlign&#8217;<br />
// of the element (this)?<br />
        var div = $(this).children(&#8216;div.nitinh-vAlign&#8217;);</p>
<p>// ok, that make me think that (this) can be one of the generic (i) elements<br />
// we are walking the fn.vAlign with, am I correct?<br />
        var ph = $(this).innerHeight();</p>
<p>// no problem with these two&#8230;<br />
        var dh = div.height();<br />
        var mh = (ph &#8211; dh) / 2;</p>
<p>// and now you place the element corresponding to var div &#8220;halfway&#8221;<br />
// respect to (this).  but here (this) can be one of the many (i) we&#8217;re<br />
// passing<br />
        div.css(&#8216;top&#8217;, mh);<br />
	});<br />
};</p>
<p>// why you end up with (jQuery)?<br />
})(jQuery);</p>
<p>many thanks if you&#8217;ll have the time to answer to some of these very trivial question, it would be helpful to me in getting to understand how these js frameworks work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nitin</title>
		<link>http://www.nitinh.com/2010/01/vertical-align-middle-using-javascript-jquery-mootools/comment-page-1/#comment-4504</link>
		<dc:creator>nitin</dc:creator>
		<pubDate>Thu, 14 Jan 2010 20:06:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.nitinh.com/?p=345#comment-4504</guid>
		<description>It will work with the percentage heights but will not work when browser gets resized.

But it can be easily modified to get it working even on resize by attaching an Event on Resize..</description>
		<content:encoded><![CDATA[<p>It will work with the percentage heights but will not work when browser gets resized.</p>
<p>But it can be easily modified to get it working even on resize by attaching an Event on Resize..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Edd Turtle</title>
		<link>http://www.nitinh.com/2010/01/vertical-align-middle-using-javascript-jquery-mootools/comment-page-1/#comment-4502</link>
		<dc:creator>Edd Turtle</dc:creator>
		<pubDate>Thu, 14 Jan 2010 19:19:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.nitinh.com/?p=345#comment-4502</guid>
		<description>Hey there, does this work with percentage heights and when a browser gets resized?</description>
		<content:encoded><![CDATA[<p>Hey there, does this work with percentage heights and when a browser gets resized?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Heti események &#124; I build websites</title>
		<link>http://www.nitinh.com/2010/01/vertical-align-middle-using-javascript-jquery-mootools/comment-page-1/#comment-4323</link>
		<dc:creator>Heti események &#124; I build websites</dc:creator>
		<pubDate>Tue, 05 Jan 2010 09:09:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.nitinh.com/?p=345#comment-4323</guid>
		<description>[...] Shared Vertical-Align : Middle Using Javascript : JQuery &amp; Mootools &#124; The Code Dreamer : Nitin Hayaran. [...]</description>
		<content:encoded><![CDATA[<p>[...] Shared Vertical-Align : Middle Using Javascript : JQuery &amp; Mootools | The Code Dreamer : Nitin Hayaran. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Allineamento verticale con jquery e mootools</title>
		<link>http://www.nitinh.com/2010/01/vertical-align-middle-using-javascript-jquery-mootools/comment-page-1/#comment-4312</link>
		<dc:creator>Allineamento verticale con jquery e mootools</dc:creator>
		<pubDate>Tue, 05 Jan 2010 01:20:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.nitinh.com/?p=345#comment-4312</guid>
		<description>[...] Link: http://www.nitinh.com/2010/01/vertical-align-middle-using-javascript-jquery-mootools/ [...]</description>
		<content:encoded><![CDATA[<p>[...] Link: <a href="http://www.nitinh.com/2010/01/vertical-align-middle-using-javascript-jquery-mootools/" rel="nofollow">http://www.nitinh.com/2010/01/vertical-align-middle-using-javascript-jquery-mootools/</a> [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
