<?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/"
	>

<channel>
	<title>joseblog</title>
	<atom:link href="http://joseblog.info/feed/" rel="self" type="application/rss+xml" />
	<link>http://joseblog.info</link>
	<description>Just another WordPress weblog</description>
	<pubDate>Mon, 13 Jul 2009 06:23:52 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>test</title>
		<link>http://joseblog.info/test/</link>
		<comments>http://joseblog.info/test/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 06:18:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://joseblog.info/test/</guid>
		<description><![CDATA[//first we check the browser name and version to be ie6        if((navigator.appName==”Microsoft Internet Explorer”) &#38;&#38; (parseInt(navigator.appVersion) &#60;=6)) {     &#160;&#160;&#160; //then we browse through the li tags        &#160;&#160;&#160; var target=document.getElementById(’target’).getElementsByTagName(’li’);     &#160;&#160;&#160; for(i=0; i&#60;target.length; i++) [...]]]></description>
			<content:encoded><![CDATA[<p><em><font size="1">//first we check the browser name and version to be ie6        <br /></font></em>if((navigator.appName==”Microsoft Internet Explorer”) &amp;&amp; (parseInt(navigator.appVersion) &lt;=6)) {     <br />&#160;&#160;&#160; <font size="1"><em>//then we browse through the li tags        <br /></em></font>&#160;&#160;&#160; var target=document.getElementById(’target’).getElementsByTagName(’li’);     <br />&#160;&#160;&#160; for(i=0; i&lt;target.length; i++) {     <br />&#160;&#160;&#160; <em><font size="2">//then we set that on mouseover event to add besides the actual class the “over” class, and on mouseout to remove the over class        <br /></font></em>&#160;&#160;&#160;&#160;&#160;&#160;&#160; target[i].onmouseover=function() { this.className+=” over”; }     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; target[i].onmouseout=function() { this.className=this.className.replace(” over”, “”);&#160; }     <br />}     <br />}</p>
]]></content:encoded>
			<wfw:commentRss>http://joseblog.info/test/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hello world!</title>
		<link>http://joseblog.info/hello-world/</link>
		<comments>http://joseblog.info/hello-world/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 12:44:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://joseblog.info/?p=1</guid>
		<description><![CDATA[Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!
]]></description>
			<content:encoded><![CDATA[<p>Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!</p>
]]></content:encoded>
			<wfw:commentRss>http://joseblog.info/hello-world/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Three short snippet in javascript and jquery</title>
		<link>http://joseblog.info/three-short-snippet-in-javascript-and-jquery/</link>
		<comments>http://joseblog.info/three-short-snippet-in-javascript-and-jquery/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 19:19:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://localhost/?p=95</guid>
		<description><![CDATA[Three snippet about hover event, float bug,]]></description>
			<content:encoded><![CDATA[<h2>1. Hoverevent on li tag with unobtrusive javascript</h2>
<p>Goal:We want to put a hover event on li tag, but ie6 knows hover just on links.So we need to put a class on li tag on mouseover and remove this class<br />
on mouseout.</p>
<p>The jQuery way:</p>
<div class="code">if(($.browser.msie) &amp;&amp; ($.browser.version &lt;= 6)) {<br />
$(&#8217;#target li&#8217;).mouseover(function(){$(this).addClass(&#8217;over&#8217;)})<br />
.mouseout(function() { $(this).removeClass(&#8217;over&#8217;)<br />
});<br />
}</div>
<p>The javascript way:</p>
<div class="code">//first we check the browser name and version to be ie6<br />
if((navigator.appName==&#8221;Microsoft Internet Explorer&#8221;) &amp;&amp; (parseInt(navigator.appVersion) &lt;=6)) {<br />
//then we browse through the li tags<br />
var target=document.getElementById(&#8217;target&#8217;).getElementsByTagName(&#8217;li&#8217;);<br />
for(i=0; i&lt;target.length; i++) {<br />
//then we set that on mouseover event to add besides the actual class the &#8220;over&#8221; class, and on mouseout to remove the over class<br />
target[i].onmouseover=function() { this.className+=&#8221; over&#8221;; }<br />
target[i].onmouseout=function() { this.className=this.className.replace(&#8221; over&#8221;, &#8220;&#8221;);  }<br />
}<br />
}</div>
<h2>Floated elements with different heights bug</h2>
<p>Goal: floated li elements with diferent height, don&#8217;t align properly, so we have to add after the last li element in every line an empty li element with clear:both style.</p>
<p>Here is the jQuery method:</p>
<div class="code">$(&#8217;#right ul.target li:odd&#8217;).after(&#8217;&lt;li class=&#8221;clear&#8221;&gt;&lt;/li&gt;&#8217;);</div>
<p>With this line we insert a new li tag with the class &#8220;clear&#8221; after every second li tag in the list with the classname &#8220;target&#8221;.</p>
<p>In case we just want to use javascript without any js library, we cand do it this way:</p>
<div class="code">//first we browse through every ul tag in the div with id right<br />
var odd=document.getElementById(&#8217;right&#8217;).getElementsByTagName(&#8221;ul&#8221;);<br />
var newLi;<br />
for (var x = 0; ; x<br />
//then we filter those that have the class list<br />
if (odd[x].className.indexOf(&#8217;list&#8217;) != -1) {<br />
//then we get an array of all the li elements in our list<br />
var oddli=odd[x].getElementsByTagName(&#8217;li&#8217;);<br />
for (var z = 0;  z<br />
//because dom doesn&#8217;t have insertAfter method, we have to get every third li element and use the insertBefore method on them<br />
if(z%3==0) {<br />
//here we have to create a li element at each third li element<br />
newLi=document.createElement(&#8217;li&#8217;);<br />
if(z&gt;0)	odd.insertBefore(newLi, oddli[z-1]);<br />
}<br />
}<br />
}<br />
}</div>
<p>Thats all.</p>
<h2>Rounded corners</h2>
<p>Goal: we want to apply rounded corners to an image with id &#8220;target&#8221; , so we wrap it in a div that will have position:relative; and than insert 4 span<br />
tags that will represent the 4 corners of the image, that will have position absolute.</p>
<p>The jquery way:<br />
$(&#8217;#target&#8217;).wrap(&#8217;</p>
<div class="wrapper">$(&#8217;.wrapper&#8217;).prepend(&#8221;)</p>
<p>The javascript way:<br />
//first we create the wrapper div with the class &#8220;wrapper&#8221;<br />
var wrapdiv = document.createElement(&#8217;div&#8217;);<br />
wrapdiv.className = &#8216;wrapper&#8217;;<br />
//then we copy into this wrapper div the cloned version of the image<br />
var target=document.getElementById(&#8217;target&#8217;);<br />
wrapdiv.appendChild(target.cloneNode(true));<br />
//then we replace the original image with the wrapper div that has inside the cloned image<br />
target.parentNode.replaceChild(wrapdiv, target);<br />
//then we create all the span elements and insert it before the image inside the wrapper<br />
var tl=document.createElement(&#8217;span&#8217;)<br />
tl.className=&#8221;topleft&#8221;<br />
var tr=document.createElement(&#8217;span&#8217;)<br />
tr.className=&#8221;topright&#8221;<br />
var bl=document.createElement(&#8217;span&#8217;)<br />
bl.className=&#8221;bottomleft&#8221;<br />
var br=document.createElement(&#8217;span&#8217;)<br />
br.className=&#8221;bottomright&#8221;<br />
wrapdiv.appendChild(tl)<br />
wrapdiv.appendChild(tr)<br />
wrapdiv.appendChild(bl)<br />
wrapdiv.appendChild(br)</p></div>
]]></content:encoded>
			<wfw:commentRss>http://joseblog.info/three-short-snippet-in-javascript-and-jquery/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Floated elements with different heights bug</title>
		<link>http://joseblog.info/floated-elements-with-different-heights-bug/</link>
		<comments>http://joseblog.info/floated-elements-with-different-heights-bug/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 18:17:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://localhost/?p=86</guid>
		<description><![CDATA[floated li elements with diferent height, don't align properly, so we have to add after the last li element...]]></description>
			<content:encoded><![CDATA[<p>Goal: floated li elements with diferent height, don&#8217;t align properly, so we have to add after the last li element in every line an empty li element with clear:both style.</p>
<p>Here is the jQuery method:</p>
<p>$(&#8217;#right ul.target li:odd&#8217;).after(&#8217;&lt;li class=&#8221;clear&#8221;&gt;&lt;/li&gt;&#8217;);</p>
<p>With this line we insert a new li tag with the class &#8220;clear&#8221; after every second li tag in the list with the classname &#8220;target&#8221;.</p>
<p>In case we just want to use javascript without any js library, we cand do it this way:</p>
<div class="code">
//first we browse through every ul tag in the div with id right<br />
var odd=document.getElementById(&#8217;right&#8217;).getElementsByTagName(&#8221;ul&#8221;);<br />
var newLi;<br />
for (var x = 0; ; x<odd.length; ++x) {<br />
//then we filter those that have the class list<br />
if (odd[x].className.indexOf('list') != -1) {<br />
//then we get an array of all the li elements in our list<br />
var oddli=odd[x].getElementsByTagName('li');<br />
for (var z = 0;  z<oddli.length; ++z) {<br />
//because dom doesn't have insertAfter method, we have to get every third li element and use the insertBefore method on them<br />
if(z%3==0) {<br />
//here we have to create a li element at each third li element<br />
newLi=document.createElement('li');<br />
if(z&gt;0)	odd.insertBefore(newLi, oddli[z-1]);<br />
}<br />
}<br />
}<br />
}
</div>
<p>Thats all.</p>
]]></content:encoded>
			<wfw:commentRss>http://joseblog.info/floated-elements-with-different-heights-bug/feed/</wfw:commentRss>
		</item>
		<item>
		<title>test1</title>
		<link>http://joseblog.info/whatever-text/</link>
		<comments>http://joseblog.info/whatever-text/#comments</comments>
		<pubDate>Sun, 07 Jun 2009 16:30:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://localhost/?p=1</guid>
		<description><![CDATA[Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!
]]></description>
			<content:encoded><![CDATA[<p>Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!</p>
]]></content:encoded>
			<wfw:commentRss>http://joseblog.info/whatever-text/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
