<?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>Pablo Noel &#187; jquery</title>
	<atom:link href="http://pablonoel.com/tags/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://pablonoel.com</link>
	<description>Designer, Skater, Punk</description>
	<lastBuildDate>Mon, 30 Jan 2012 04:15:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to create transparents backgrounds with CSS and Javascript</title>
		<link>http://pablonoel.com/code/how-to-create-transparents-backgrounds-with-css-and-javascript/</link>
		<comments>http://pablonoel.com/code/how-to-create-transparents-backgrounds-with-css-and-javascript/#comments</comments>
		<pubDate>Mon, 25 Oct 2010 21:13:48 +0000</pubDate>
		<dc:creator>Pablo Noel</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://pablonoel.com/?p=745</guid>
		<description><![CDATA[One of the most used graphic resources on the web are transparent backgrounds, the main problem with them, besides the readability of the content inside, is the always hard cross browsing, so lets see  how we can do some workarounds in order to make some nice transparent backgrounds. The &#8220;opacity&#8221; problem The simple and short [...]]]></description>
			<content:encoded><![CDATA[<p>One of the most used graphic resources on the web are transparent backgrounds, the main problem with them, besides the readability of the content inside, is the always hard cross browsing, so lets see  how we can do some workarounds in order to make some nice transparent backgrounds.</p>
<h4>The &#8220;opacity&#8221; problem</h4>
<p>The simple and short CSS &#8220;opacity:0.5&#8243; property works just fine, at least on the most modern browsers, but affects not only the div`s background, but also the inner elements, making everything inside transparent. This can be solved by two ways.</p>
<h4>The solution from the future</h4>
<p>Using the CSS3 background property <a title="RGBA explained" href="http://www.css3.info/preview/rgba/">RBGA</a>, the only problem its this will only works with CSS3 enabled browsers.</p>
<p><strong>CSS</strong><br />
<code>div{<br />
background-color:rgba(255,255,255,0.5);<br />
}</code></p>
<h4>The solution for the past</h4>
<p>Or by a workaround using a transparent empty element positioned behind the content, like this:</p>
<p><strong>HTML</strong><br />
<code><br />
&lt;div class="trans_box"&gt;<br />
&lt;p&gt;My awesome content&lt;/p&gt;<br />
&lt;div class="trans_back"&gt;&lt;/div&gt;<br />
&lt;/div&gt;</code></p>
<p><strong>CSS</strong></p>
<p><code>.trans_box{<br />
position:relative;<br />
z-index:1;<br />
}<br />
.trans_back{<br />
position:absolute;<br />
z-index:-1<br />
top:0;<br />
left:0;<br />
width:100%;<br />
height:100%; // the height needs to be fixed in order to display correctly on ie6<br />
background:black;<br />
opacity:0.5;<br />
}</code></p>
<p>The problem, again, its this just work on modern browsers, but we have a Javascript solution for the always loved IE family</p>
<p><strong>CSS</strong></p>
<p><code>.trans_back{<br />
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; // ie8 hack<br />
filter: alpha(opacity=50); // ie6-7 hack<br />
}</code></p>
<h4>The Jquery way</h4>
<p>But hey, thats was an UGLY solution, so here it comes jQuery to saves the day. Using the same concept we can make a simple function that replace the ugliness of the hack, and will maintain the simplest html structure possible.</p>
<p><strong>HTML</strong><br />
<code>&lt;div class="trans_box"&gt;<br />
&lt;p&gt;My awesome content&lt;/p&gt;<br />
&lt;/div&gt;</code></p>
<p><strong>JS</strong><br />
<code>$('.trans_box').append('&lt;div class="trans_back"&gt;&lt;/div&gt;');<br />
$('.trans_box .trans_back').css({'opacity':0.50});</code></p>
<p><strong>CSS</strong><br />
<code>.trans_box{<br />
position:relative;<br />
z-index:1;<br />
}<br />
.trans_back{<br />
background:black;<br />
width:100%;<br />
height:100%; // the height needs to be fixed in order to display correctly on ie6<br />
position:absolute;<br />
top:0;left:0;<br />
z-index:-1;<br />
display:block;<br />
}</code></p>
<p>And thats all, i hope this little resume could save you some headaches.</p>
]]></content:encoded>
			<wfw:commentRss>http://pablonoel.com/code/how-to-create-transparents-backgrounds-with-css-and-javascript/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Clean inputs on focus</title>
		<link>http://pablonoel.com/code/clean-inputs-on-focus/</link>
		<comments>http://pablonoel.com/code/clean-inputs-on-focus/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 20:58:21 +0000</pubDate>
		<dc:creator>Pablo Noel</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://pablonoel.com/?p=78</guid>
		<description><![CDATA[A fast and nice way using Jquery to clean input values on focus, and put the default value back when is empty: $(".clean").each(function(){ var value = $(this).val(); $(this).focusin(function(){if($(this).val() == value){$(this).val("");};}); $(this).focusout(function(){if($(this).val() == ''){$(this).val(value);};}); }); Just add the class &#8220;.clean&#8221; to your input tag and voilá.]]></description>
			<content:encoded><![CDATA[<p>A fast and nice way using Jquery to clean input values on focus, and put the default value back when is empty:</p>
<p><code>$(".clean").each(function(){<br />
var value = $(this).val();<br />
$(this).focusin(function(){if($(this).val() == value){$(this).val("");};});<br />
$(this).focusout(function(){if($(this).val() == ''){$(this).val(value);};});<br />
});</code></p>
<p>Just add the class &#8220;.clean&#8221; to your input tag and voilá.</p>
]]></content:encoded>
			<wfw:commentRss>http://pablonoel.com/code/clean-inputs-on-focus/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Cocombobox Jquery Plugin for enhanced Comboboxs / Select Boxes</title>
		<link>http://pablonoel.com/code/cocombobox-jquery-plugin-for-enhanced-comboboxs-select-boxes/</link>
		<comments>http://pablonoel.com/code/cocombobox-jquery-plugin-for-enhanced-comboboxs-select-boxes/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 15:30:47 +0000</pubDate>
		<dc:creator>Pablo Noel</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[combobox]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[select]]></category>

		<guid isPermaLink="false">http://pablonoel.com/?p=67</guid>
		<description><![CDATA[Working on a couple of proyects i find myself searching for a solution for the customization for our so-long-used Select tag,  a.k.a Combobox. If you work with HTML you will know that its so freaking hard to add custom graphics and behaviors to this element, so i made a &#8220;simple&#8221; and kind of naiv solution [...]]]></description>
			<content:encoded><![CDATA[<p>Working on a couple of proyects i find myself searching for a solution for the customization for our so-long-used <a title="Select Tag at W3Schools" href="http://www.w3schools.com/TAGS/tag_Select.asp">Select tag</a>,  a.k.a <a title="Combobox at Wikipedia" href="http://en.wikipedia.org/wiki/Combo_box">Combobox</a>. If you work with HTML you will know that its so freaking hard to add custom graphics and behaviors to this element, so i made a &#8220;simple&#8221; and kind of naiv solution for this.</p>
<h3>Cocombobox Jquery Plugin</h3>
<p>This will add a &#8220;Combobox&#8221; kind of interaction to a standard list of elements, view the example page:</p>
<p><a title="Select Box - Combobox Jquery Plugin replacement" href="http://pablonoel.com/lab/jquery/cocombobox/">http://pablonoel.com/lab/jquery/cocombobox/</a></p>
<h4>Default HTML:</h4>
<p><code>&lt;form action="#" method="post"&gt;<br />
&lt;h3&gt;Combobox Default Configuration&lt;/h3&gt;<br />
&lt;ol&gt;<br />
&lt;li&gt;Select an Option&lt;/li&gt;<br />
&lt;li&gt;&lt;a title="enlace" rel="first" href="#"&gt;First Option&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a title="enlace" rel="second" href="#"&gt;Second Option&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a title="enlace" rel="third" href="#"&gt;Third Option&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ol&gt;<br />
&lt;/form&gt;</code></p>
<h4>Default Call</h4>
<p><code>$("ol").cocombobox();</code></p>
<h4>Generated HTML</h4>
<p><code>&lt;form action="#" method="post"&gt;<br />
&lt;h3&gt;Combobox Default Configuration&lt;/h3&gt;<br />
&lt;div style="position: relative; height: 20px; z-index: 9938;" class="comboboxccbx"&gt;&lt;ol style="overflow: hidden; position: absolute; height: 20px; z-index: 9938;" class="min"&gt;<br />
&lt;li id="option"&gt;Select an Option&lt;/li&gt;<br />
&lt;li&gt;&lt;a href="#" title="enlace" rel="first"&gt;First Option&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href="#" title="enlace" rel="second"&gt;Second Option&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href="#" title="enlace" rel="third"&gt;Third Option&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ol&gt;&lt;input name="combobox" id="combobox" value="" type="hidden"&gt;&lt;/div&gt;<br />
&lt;/form&gt;</code><br />
There is no documentation yet, and no changelog, but this is the first release, you can <a title="Download Plugin" href="http://pablonoel.com/lab/jquery/cocombobox/jquery.cocombobox.js">Download it</a> and tell me your comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://pablonoel.com/code/cocombobox-jquery-plugin-for-enhanced-comboboxs-select-boxes/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

