<?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>Dev 4 Web &#187; JQuery</title>
	<atom:link href="http://nordz.sauleil.com/category/programming/js/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://nordz.sauleil.com</link>
	<description>Just another Developer WordPress Discovery Channel</description>
	<lastBuildDate>Mon, 12 Apr 2010 08:17:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to resize IFrame to it&#8217;s content full height</title>
		<link>http://nordz.sauleil.com/2008/09/14/iframe-resize-to-its-content-full-height/</link>
		<comments>http://nordz.sauleil.com/2008/09/14/iframe-resize-to-its-content-full-height/#comments</comments>
		<pubDate>Sun, 14 Sep 2008 14:52:56 +0000</pubDate>
		<dc:creator>Nordes</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[IFrame]]></category>
		<category><![CDATA[Internet Explorer]]></category>

		<guid isPermaLink="false">http://nordz.sauleil.com/?p=177</guid>
		<description><![CDATA[When working with IFrame, we may want the frame taking the 100% height of its content. In fact, we want to simulate the IFrame to look like a DIV. It is not simple as setting height 100% and overflow none. 
The content of the IFrame content load after the current page is loaded or after [...]]]></description>
			<content:encoded><![CDATA[<p>When working with IFrame, we may want the frame taking the 100% height of its content. In fact, we want to simulate the IFrame to look like a DIV. It is not simple as setting height 100% and overflow none. </p>
<p>The content of the IFrame content load after the current page is loaded or after the &#8220;src&#8221; attribute change. So we are not able to have the IFrame content height or width until the data is rendered. It exist an event handler called &#8220;onload&#8221; that trigger once the content is loaded, but it is not possible to get the content body height, in fact it will alway&#8217;s return 0. By googling, I&#8217;ve found a lot of solutions, but none of them was working properly or at least working like I wanted. Because of that, I&#8217;ve written my own solution.</p>
<p>My solution is to use a &#8220;setTimeout&#8221; until the IFrame content is fully rendered on the page and after that, we are able to get the iframe content height and set it to the IFrame itself. In the following solution I actually use JQuery. If you need to convert it to normal JavaScript, it should be pretty easy.</p>
<p>Write this into your HTML:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre>&lt;iframe id=&quot;iframeId&quot; name=&quot;iframeId&quot; onload=&quot;sizeIFrame(this.id)<SEMI>&quot; style=&quot;width:100%<SEMI>&quot;&gt;
&lt;/iframe&gt;</pre></td></tr></table></div>

<p>Write this in your javascript (header or JS file):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="javascript"><span style="color: #003366; font-weight: bold;">function</span> sizeIFrame<span style="color: #009900;">&#40;</span>frameId<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> myIFrame <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#&quot;</span> <span style="color: #339933;">+</span> frameId<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> innerDoc <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>myIFrame.<span style="color: #006600;">get</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span>.<span style="color: #006600;">contentDocument</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">?</span> myIFrame.<span style="color: #006600;">get</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span>.<span style="color: #006600;">contentDocument</span> <span style="color: #339933;">:</span> myIFrame.<span style="color: #006600;">get</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span>.<span style="color: #006600;">contentWindow</span>.<span style="color: #006600;">document</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span><span style="color: #006600; font-style: italic;">// will throw an exception if the body is not fully loaded.</span>
		myIFrame.<span style="color: #006600;">height</span><span style="color: #009900;">&#40;</span>innerDoc.<span style="color: #006600;">body</span>.<span style="color: #006600;">scrollHeight</span> <span style="color: #339933;">+</span> <span style="color: #CC0000;">35</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>innerDoc.<span style="color: #006600;">body</span> <span style="color: #339933;">&amp;&amp;</span> innerDoc.<span style="color: #006600;">body</span>.<span style="color: #006600;">scrollHeight</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		setTimeout<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> sizeIFrame<span style="color: #009900;">&#40;</span>frameId<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>If you are having any problem please leave a comment.</p>
<p>This solution have only been tested on Internet Explorer 6/7</p>
]]></content:encoded>
			<wfw:commentRss>http://nordz.sauleil.com/2008/09/14/iframe-resize-to-its-content-full-height/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>New plugin added on the site [HeartBeat]</title>
		<link>http://nordz.sauleil.com/2008/08/13/new-plugin-added-on-the-site-heartbeat/</link>
		<comments>http://nordz.sauleil.com/2008/08/13/new-plugin-added-on-the-site-heartbeat/#comments</comments>
		<pubDate>Thu, 14 Aug 2008 00:19:28 +0000</pubDate>
		<dc:creator>Nordes</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://nordz.sauleil.com/?p=129</guid>
		<description><![CDATA[I&#8217;ve created an another plugin that works on any html items. All you need to do is to do your selector and call my plugin &#8220;heartBeat&#8221;.
Example of doing a little animation with 3 divs (the 3 boxes under the code):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
	$&#40;document&#41;.ready&#40;function&#40;&#41;&#123;
		$&#40;&#34;#beat1&#34;&#41;.heartBeat&#40;
			&#123;
			delayBetweenAnimation:2000,  
			delay:1000 
			&#125;&#41;;
		setTimeout&#40;function&#40;&#41;&#123;
			$&#40;&#34;#beat2&#34;&#41;.heartBeat&#40;
				&#123;
				delayBetweenAnimation:2000,  
				delay:1000 
				&#125;&#41;;
		&#125;, 200&#41;;
		setTimeout&#40;function&#40;&#41;&#123;
			$&#40;&#34;#beat3&#34;&#41;.heartBeat&#40;
				&#123;
				delayBetweenAnimation:2000,  
				delay:1000 
				&#125;&#41;;
		&#125;, 500&#41;;
	&#125;&#41;;







My 3 divs are made [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve created an another plugin that works on any html items. All you need to do is to do your selector and call my plugin &#8220;heartBeat&#8221;.</p>
<p>Example of doing a little animation with 3 divs <span id="boxesInfo" style="color:darkred;">(the 3 boxes under the code)</span>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
</pre></td><td class="code"><pre class="javascript">	$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #006600;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#beat1&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006600;">heartBeat</span><span style="color: #009900;">&#40;</span>
			<span style="color: #009900;">&#123;</span>
			delayBetweenAnimation<span style="color: #339933;">:</span><span style="color: #CC0000;">2000</span><span style="color: #339933;">,</span>  
			delay<span style="color: #339933;">:</span><span style="color: #CC0000;">1000</span> 
			<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		setTimeout<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#beat2&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006600;">heartBeat</span><span style="color: #009900;">&#40;</span>
				<span style="color: #009900;">&#123;</span>
				delayBetweenAnimation<span style="color: #339933;">:</span><span style="color: #CC0000;">2000</span><span style="color: #339933;">,</span>  
				delay<span style="color: #339933;">:</span><span style="color: #CC0000;">1000</span> 
				<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">200</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		setTimeout<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#beat3&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006600;">heartBeat</span><span style="color: #009900;">&#40;</span>
				<span style="color: #009900;">&#123;</span>
				delayBetweenAnimation<span style="color: #339933;">:</span><span style="color: #CC0000;">2000</span><span style="color: #339933;">,</span>  
				delay<span style="color: #339933;">:</span><span style="color: #CC0000;">1000</span> 
				<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">500</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<div>
<div id="beat1" style="float:left;margin-left:5px;background-color:#AABBCC; width:10px; height:10px;"></div>
<div id="beat2" style="float:left;margin-left:5px;background-color:#AABBCC; width:20px; height:20px;"></div>
<div id="beat3" style="float:left;margin-left:5px;background-color:#AABBCC; width:30px; height:30px;"></div>
</div>
<p><br/><br />
My 3 divs are made like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="html4strict"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;beat1&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;float:left;margin-left:5px;background-color:#AABBCC; width:10px; height:10px;&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;beat2&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;float:left;margin-left:5px;background-color:#AABBCC; width:20px; height:20px;&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;beat3&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;float:left;margin-left:5px;background-color:#AABBCC; width:30px; height:30px;&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span></pre></td></tr></table></div>

<p>Note that, you can use class or whatever you want inside the selector instead of the id (I recommend it).</p>
<p><a href="http://nordz.sauleil.com/downloads/JQuery-heartBeat.zip">Heart Beat 0.1</a><br />
<script type="text/JavaScript">
	$(document).ready(function(){
		$("#beat1, #boxesInfo").heartBeat(
			{
			delayBetweenAnimation:2000,  
			delay:1000 
			});
		setTimeout(function(){
			$("#beat2").heartBeat(
				{
				delayBetweenAnimation:2000,  
				delay:1000 
				});
		}, 200);
		setTimeout(function(){
			$("#beat3").heartBeat(
				{
				delayBetweenAnimation:2000,  
				delay:1000 
				});
		}, 500);
	});
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://nordz.sauleil.com/2008/08/13/new-plugin-added-on-the-site-heartbeat/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>JQuery &#8211; checkboxMod plugins is now available</title>
		<link>http://nordz.sauleil.com/2008/08/11/jquery-checkboxmod-plugins-is-now-available/</link>
		<comments>http://nordz.sauleil.com/2008/08/11/jquery-checkboxmod-plugins-is-now-available/#comments</comments>
		<pubDate>Mon, 11 Aug 2008 11:49:50 +0000</pubDate>
		<dc:creator>Nordes</dc:creator>
				<category><![CDATA[JQuery]]></category>

		<guid isPermaLink="false">http://nordz.sauleil.com/?p=89</guid>
		<description><![CDATA[My first JQuery plugin is now available to everyone. I also added the plugin into the JQuery plugins site. To access this plugin you only have to click here.
Description:
This plugin is used to enhence the actual checkbox in pages. Depending on OS and Theme, people actually have different check box look and feel. The one [...]]]></description>
			<content:encoded><![CDATA[<p>My first JQuery plugin is now available to everyone. I also added the plugin into the JQuery plugins site. To access this plugin you only have to click <a href="http://nordz.sauleil.com/jquery-plugins/downloads/">here</a>.</p>
<p><strong>Description:</strong><br />
This plugin is used to enhence the actual checkbox in pages. Depending on OS and Theme, people actually have different check box look and feel. The one in Windows XP is actually looking good, but compared to Vista, Vista is even more beautiful. I wanted to create a more standard check box that you can use everywhere (code behind, etc.).</p>
<p>Sample:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="javascript">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #006600;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
 $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#cbwt1&quot;</span><span style="color: #009900;">&#41;</span>
  .<span style="color: #006600;">CheckboxMod</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
      ImageUrlChecked<span style="color: #339933;">:</span> <span style="color: #3366CC;">'http://nordz.sauleil.com/wp-includes/images/nordz/CBMod/checked.jpg'</span><span style="color: #339933;">,</span> 
      ImageUrlUnchecked<span style="color: #339933;">:</span> <span style="color: #3366CC;">'http://nordz.sauleil.com/wp-includes/images/nordz/CBMod/unchecked.jpg'</span>
   <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<input id="cbwt1" type="checkbox" /><label for="cbwt1">Click me</label> : This is a checkbox rendered using checkboxMod plugin. </p>
<p>To know more about that plugin, you can go in JQuery Plugins section.<br />
<script>
$(document).ready(function(){
 $("#cbwt1")
  .CheckboxMod({ImageUrlChecked: 'http://nordz.sauleil.com/wp-includes/images/nordz/CBMod/checked.jpg', ImageUrlUnchecked: 'http://nordz.sauleil.com/wp-includes/images/nordz/CBMod/unchecked.jpg'});
});
</script></p>
<p><a href="http://nordz.sauleil.com/downloads/JQuery-checkboxMod.zip">Download Checkbox Modfier Version 0.2</a></p>
]]></content:encoded>
			<wfw:commentRss>http://nordz.sauleil.com/2008/08/11/jquery-checkboxmod-plugins-is-now-available/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
