<?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>Programming Ideas, Logics, Tips and Tricks &#187; tips</title>
	<atom:link href="http://www.sajithmr.me/tag/tips/feed" rel="self" type="application/rss+xml" />
	<link>http://www.sajithmr.me</link>
	<description></description>
	<lastBuildDate>Mon, 23 Jan 2012 15:44:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>jQuery Traversing Tips</title>
		<link>http://www.sajithmr.me/jquery-traversing-tips</link>
		<comments>http://www.sajithmr.me/jquery-traversing-tips#comments</comments>
		<pubDate>Thu, 14 Oct 2010 13:09:48 +0000</pubDate>
		<dc:creator>Mr Me</dc:creator>
				<category><![CDATA[quicktips]]></category>
		<category><![CDATA[child]]></category>
		<category><![CDATA[children]]></category>
		<category><![CDATA[closest]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[keywords]]></category>
		<category><![CDATA[next]]></category>
		<category><![CDATA[parent]]></category>
		<category><![CDATA[parents]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[traversing]]></category>

		<guid isPermaLink="false">http://www.sajithmr.me/jquery-traversing-tips/</guid>
		<description><![CDATA[Just a quick review of tips available in jQuery to manage nodes (contents) near by the content / node which is triggered an event, like click, hover etc Functions: find, parent, parents, children, first, last, closest Suppose you need to manage some nodes nearby a link or a button on an event. Say $(&#8216;.button&#8217;).click(function(){ // [...]]]></description>
			<content:encoded><![CDATA[<p style="clear: both">Just a quick review of tips available in jQuery to manage nodes (contents) near by the content / node which is triggered an event, like click, hover etc</p>
<p style="clear: both">Functions: find, parent, parents, children, first, last, closest</p>
<p style="clear: both">Suppose you need to manage some nodes nearby a link or a button on an event.</p>
<p style="clear: both">Say $(&#8216;.button&#8217;).click(function(){</p>
<p style="clear: both">// code goes here</p>
<p>})</p>
<p style="clear: both">To get the current parent of triggered element, use $(this).parent()</p>
<p style="clear: both">To get the parent which has a class , use:<br />$(this).parents(&#8216;.classname&#8217;);</p>
<p style="clear: both">To find any other element just above the node, use :<br />$(this).parents(&#8216;.classname&#8217;).find(&#8216;li&#8217;);</p>
<p style="clear: both">to get the first element in find, use find(&#8216;li:first&#8217;)</p>
<p style="clear: both">and for last, use li:last</p>
<p style="clear: both">To get exactly the child nodes, use:<br />$(&#8216;.classname&#8217;).children(&#8216;some_selector_here&#8217;);</p>
<p style="clear: both">Here comes another very useful function, which is, <strong>closest</strong></p>
<p style="clear: both">$(this).closest(&#8216;td&#8217;) etc </p>
<p style="clear: both">So, this quick note will be helpful to you</p>
<p style="clear: both">Thanks</p>
<p style="clear: both">Sajith</p>
<p style="clear: both">
<p><br class="final-break" style="clear: both" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/jquery-traversing-tips/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Just a second with Iframe</title>
		<link>http://www.sajithmr.me/just-a-second-with-iframe</link>
		<comments>http://www.sajithmr.me/just-a-second-with-iframe#comments</comments>
		<pubDate>Wed, 11 Nov 2009 20:07:59 +0000</pubDate>
		<dc:creator>Mr Me</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[iframe]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.sajithmr.me/?p=490</guid>
		<description><![CDATA[IF you are facing problem with layout issues inside iframe (which is normally not there in normal pages) just test these things. Iframe is considered as a separate html page. So it needs all the basic tags, from html, head, body. It does not get styles from parent, so you need to add manually in [...]]]></description>
			<content:encoded><![CDATA[<p>IF you are facing problem with layout issues inside iframe (which is normally not there in normal pages) just test these things.</p>
<p><img class="alignnone size-full wp-image-493" title="flex-iframe-logo-128" src="http://www.sajithmr.me/wp-content/uploads/2009/11/flex-iframe-logo-128.png" alt="flex-iframe-logo-128" width="128" height="128" /></p>
<ul>
<li>Iframe is considered as a separate html page. So it needs all the basic tags, from html, head, body.</li>
<li>It does not get styles from parent, so you need to add manually in the header</li>
<li>Take care of javascript calls  separated with parent and local (if anything related with parent , use parent. , for example, to access a jQuery script from parent use, parent.$.function_name)</li>
<li>Avoid define styles inside body tag with &lt;style&gt; tags, place them in &lt;head&gt; tag</li>
<li>To solve the layout issues, you must use the DOCTYPE tag at the beginning</li>
<li>If you are using any autoheight scripts to control iframe height dynamically, remember, it may not work as expected in all browser. (jQuery autoheight plugin sometimes fails in OPERA)</li>
</ul>
<pre style="word-wrap: break-word; white-space: pre-wrap;">&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"&gt;</pre>
<p>There is a saying that using iframe is a bad practise. I don&#8217;t know the fact, anyway gmail uses more than 5 iframes to implement all the features and works well. (See<a href="http://www.sajithmr.me/gmail-architecture/" target="_blank"> Gmail Architecture</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/just-a-second-with-iframe/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

