<?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>dixso.net</title>
	<atom:link href="http://dixso.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://dixso.net</link>
	<description>Desarrollo web</description>
	<lastBuildDate>Fri, 05 Feb 2010 08:09:15 +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>jQuery submitCSS</title>
		<link>http://dixso.net/jquery/jquery-submitcss/</link>
		<comments>http://dixso.net/jquery/jquery-submitcss/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 19:38:42 +0000</pubDate>
		<dc:creator>Julio</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[input]]></category>
		<category><![CDATA[submit]]></category>

		<guid isPermaLink="false">http://dixso.net/?p=483</guid>
		<description><![CDATA[Este script lo he creado por la necesidad de hacer &#8220;bonitos&#8221; los input del tipo submit, ya que por ahora, todos son de sistema y cada navegador pone el suyo, pues bien, con el script jquey.submitCSS.js podemos hacer botones pero con input del tipo submit. En ejemplo que os muestro más a bajo he jugado [...]]]></description>
			<content:encoded><![CDATA[<p>Este script lo he creado por la necesidad de hacer &#8220;bonitos&#8221; los input del tipo submit, ya que por ahora, todos son de sistema y cada navegador pone el suyo, pues bien, con el script jquey.submitCSS.js podemos hacer botones pero con input del tipo submit. En ejemplo que os muestro más a bajo he jugado con capas para modificar vía CSS las imágenes de fondo, lo he hecho para tener más de un botón de otro color de fondo. Si queréis poner vuestras própias imágenes tendréis que jugar con los estilos.</p>
<p>El script es el siguiente:</p>
<pre class="brush: jscript;">
/*
 * jQuery submitCSS v1.0
 * http://dixso.net/
 *
 * Copyright (c) 2010 Julio De La Calle Palanques
 * Date: 2010-02-04 12:34:00 - (Jueves, 04 Feb 2010)
 *
 */
function submitCSS(){
	$(&quot;input[type=submit]&quot;).each(function(){
		if($(this).hasClass(&quot;submitCSS&quot;)){
			var theclass = $(this).parent().parent(&quot;div&quot;).attr(&quot;class&quot;);
			if(theclass != &quot;btnSubmitCSS&quot;){
				$(this).wrap(&quot;&lt;div class='btnSubmitCSS'&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&quot;);
			}
		}
	});
	isIE = !$.support.opacity,
	isIE6 = isIE &amp;&amp; !window.XMLHttpRequest
	if (isIE6) {
		$(&quot;.btnSubmitCSS&quot;).mouseover(function() {
			$(this).addClass(&quot;btnSubmitCSS-ie6&quot;);
		}).mouseout(function() {
			$(this).removeClass(&quot;btnSubmitCSS-ie6&quot;);
		});
	}
}</pre>
<p>El script necesita una hoja de estilos para añadir estilos al input:</p>
<pre class="brush: css;">
/**************************************************************************
submitCSS 20100204@JCP
***************************************************************************/
#btn-1 .btnSubmitCSS					{background:url(../imagenes/btn-left-gris.gif) no-repeat 0 0;}
#btn-1 .btnSubmitCSS div				{background:url(../imagenes/btn-right-gris.gif) no-repeat right top;}
#btn-2 .btnSubmitCSS					{background:url(../imagenes/btn-left-amarillo.gif) no-repeat 0 0;}
#btn-2 .btnSubmitCSS div				{background:url(../imagenes/btn-right-amarillo.gif) no-repeat right top;}
#btn-3 .btnSubmitCSS					{background:url(../imagenes/btn-left-rojo.gif) no-repeat 0 0;}
#btn-3 .btnSubmitCSS div				{background:url(../imagenes/btn-right-rojo.gif) no-repeat right top;}
.btnSubmitCSS							{padding-left:12px;}
.btnSubmitCSS div						{padding-right:18px; padding-left:6px;}
.btnSubmitCSS, .btnSubmitCSS div		{height:32px; float:left; display:block; line-height:28px; text-decoration:none; color:#FFF; cursor:pointer; font-weight:bold;}
.btnSubmitCSS div input 				{background:none; color:#FFF; border:none; width:auto; float:left; height:32px; padding:0; font-family:Verdana, Geneva, sans-serif; display:block; font-size:11px; cursor:pointer; font-weight:bold; margin:-3px 0 0 0;}
#container .btnSubmitCSS-active,
#container .btnSubmitCSS:hover			{background-position:bottom left;}
#container .btnSubmitCSS-active div,
#container .btnSubmitCSS:hover div	 	{background-position:bottom right;}</pre>
<p>Para que el script funcione tenéis que añadir la clase &#8217;submitCSS&#8217; al input submit.</p>
<pre class="brush: xml;">
&lt;input type=&quot;submit&quot; class=&quot;submitCSS&quot; value=&quot;Esto es un boton submit&quot; /&gt;
</pre>
<p>Para finalizar, tenéis que inicializar el script:</p>
<pre class="brush: jscript;">
&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot;&gt;
	$(document).ready(function(){
		submitCSS();
	});
&lt;/script&gt;
</pre>
<p>Este script funciona para todos los navegadores, lo único a tener en cuenta es que cada navegador interpreta una tipografía diferente al igual que el tamaño, por lo demás todo perfecto.</p>
<p>Ejemplo: <a title="jQuery inputCSS" href="http://dixso.net/wp-content/examples/jquery/submitcss/" target="_blank">aquí</a>.<br />
Descarga: <a title="jQuery inputCSS" href="http://dixso.net/wp-content/examples/jquery/submitcss/download/jquery.inputCSS.rar" target="_blank">aquí</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://dixso.net/jquery/jquery-submitcss/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery equalHeight</title>
		<link>http://dixso.net/jquery/jquery-equalheight/</link>
		<comments>http://dixso.net/jquery/jquery-equalheight/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 16:23:25 +0000</pubDate>
		<dc:creator>Julio</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[equalHeight]]></category>

		<guid isPermaLink="false">http://dixso.net/?p=475</guid>
		<description><![CDATA[Con este pequeño script podemos igualar la altura de los elementos que queramos:

function equalHeight(group) {
    tallest = 0;
    group.each(function() {
        thisHeight = $(this).height();
        if(thisHeight &#62; tallest) {
         [...]]]></description>
			<content:encoded><![CDATA[<p>Con este pequeño script podemos igualar la altura de los elementos que queramos:</p>
<pre class="brush: jscript;">
function equalHeight(group) {
    tallest = 0;
    group.each(function() {
        thisHeight = $(this).height();
        if(thisHeight &gt; tallest) {
            tallest = thisHeight;
        }
    });
    group.height(tallest);
}
</pre>
<p>Inicializamos el script y le indicamos la clase que tendrán los elementos:</p>
<pre class="brush: jscript;">
$(document).ready(function(){
	//Igualamos la altura de los elementos
	equalHeight($(&quot;.igualarAltura&quot;));
});
</pre>
<p>Podéis ver un simple ejemplo: <a target="_blank" href="http://dixso.net/wp-content/examples/jquery/equalheight/" title="jQuery equalHeight">aquí</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://dixso.net/jquery/jquery-equalheight/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Browser Detect 1.1</title>
		<link>http://dixso.net/jquery/jquery-browser-detect-1-1/</link>
		<comments>http://dixso.net/jquery/jquery-browser-detect-1-1/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 09:14:00 +0000</pubDate>
		<dc:creator>Julio</dc:creator>
				<category><![CDATA[Navegadores]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[IE7]]></category>
		<category><![CDATA[IE8]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Opera]]></category>
		<category><![CDATA[Safari]]></category>

		<guid isPermaLink="false">http://dixso.net/?p=465</guid>
		<description><![CDATA[Este script nos ayudará cuando maquetemos nuestras hojas de estilos y veamos que cada navegador interpretan cosas que no deberían ser así, muy común en IE, sobretodo en la versión 6.
Antes de nada, se necesita la librería jQuery para hacer funcionar el script.
¿Qué hace el script?
- Comprueba primero si el fichero de las css de [...]]]></description>
			<content:encoded><![CDATA[<p>Este script nos ayudará cuando maquetemos nuestras hojas de estilos y veamos que cada navegador interpretan cosas que no deberían ser así, muy común en <del datetime="2009-09-18T08:11:22+00:00">IE</del>, sobretodo en la versión 6.</p>
<p>Antes de nada, se necesita la librería jQuery para hacer funcionar el script.</p>
<p><strong>¿Qué hace el script?</strong><br />
- Comprueba primero si el fichero de las css de cada navegador existe, si no existe, el script no se ejecuta, eto sirve para que el script no compruebe el navegador ni la versión del usuario.</p>
<p><em>¿Que ganamos con todo esto?</em><br />
<strong>Rapidez </strong>en la ejecución del script, es decir, solo añadirá la hoja de estilos que tengamos en el directorio /css/browsers/.</p>
<p>- Detecta el navegador <strong>Internet Explorer 8.0</strong></p>
<p>Script para comprobar rutas de ficheros físicos:</p>
<pre class="brush: jscript;">
function file_exists (url) {
    var req = this.window.ActiveXObject ? new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;) : new XMLHttpRequest();
    if (!req) {throw new Error('XMLHttpRequest not supported');}
    req.open('HEAD', url, false);
    req.send(null);
    if (req.status == 200){
        return true;
    }
    return false;
}
</pre>
<p>Especificamos a jQuery los navegadores (Útil para diferenciar Safari de Chrome).</p>
<pre class="brush: jscript;">
var userAgent = navigator.userAgent.toLowerCase();
jQuery.browser = {
	version: (userAgent.match( /.+(?:rv|it|ra|ie|me)[\/: ]([\d.]+)/ ) || [])[1],
	chrome: /chrome/.test( userAgent ),
	safari: /webkit/.test( userAgent ) &amp;&amp; !/chrome/.test( userAgent ),
	opera: /opera/.test( userAgent ),
	msie: /msie/.test( userAgent ) &amp;&amp; !/opera/.test( userAgent ),
	mozilla: /mozilla/.test( userAgent ) &amp;&amp; !/(compatible|webkit)/.test( userAgent )
};
</pre>
<p>Ejecutamos las condiciones si el fichero existe o no, si existe, comprobamos la versión del navagador del usuario y añadimos la hoja de estilos.</p>
<pre class="brush: jscript;">
//Ejecutamos las condiciones si el fichero existe o no.
$(document).ready(function(){
	jQuery.each(jQuery.browser, function(i, val) {
		if(file_exists(&quot;css/browsers/ie8.css&quot;) ){
			if(i==&quot;msie&quot; &amp;&amp; jQuery.browser.version.substr(0,3)==&quot;8.0&quot;){
				$('head').append('&lt;link rel=&quot;stylesheet&quot; href=&quot;css/browsers/ie8.css&quot; type=&quot;text/css&quot; /&gt;');
			}
		}
		if (file_exists(&quot;css/browsers/ie7.css&quot;)){
			if(i==&quot;msie&quot; &amp;&amp; jQuery.browser.version.substr(0,3)==&quot;7.0&quot;){
				$('head').append('&lt;link rel=&quot;stylesheet&quot; href=&quot;css/browsers/ie7.css&quot; type=&quot;text/css&quot; /&gt;');
			}
		}
		if (file_exists(&quot;css/browsers/ie6.css&quot;)){
			if(i==&quot;msie&quot; &amp;&amp; jQuery.browser.version.substr(0,3)==&quot;6.0&quot;){
				$('head').append('&lt;link rel=&quot;stylesheet&quot; href=&quot;css/browsers/ie6.css&quot; type=&quot;text/css&quot; /&gt;');
			}
		}
		if (file_exists(&quot;css/browsers/mozilla.css&quot;)){
			if($.browser.mozilla){
				$('head').append('&lt;link rel=&quot;stylesheet&quot; href=&quot;css/browsers/mozilla.css&quot; type=&quot;text/css&quot; /&gt;');
			}
		}
		if (file_exists(&quot;css/browsers/opera.css&quot;)){
			if($.browser.opera){
				$('head').append('&lt;link rel=&quot;stylesheet&quot; href=&quot;css/browsers/opera.css&quot; type=&quot;text/css&quot; /&gt;');
			}
		}
		if (file_exists(&quot;css/browsers/safari.css&quot;)){
			if($.browser.safari){
				$('head').append('&lt;link rel=&quot;stylesheet&quot; href=&quot;css/browsers/safari.css&quot; type=&quot;text/css&quot; /&gt;');
			}
		}
		if (file_exists(&quot;css/browsers/chrome.css&quot;)){
			if($.browser.chrome){
				$('head').append('&lt;link rel=&quot;stylesheet&quot; href=&quot;css/browsers/chrome.css&quot; type=&quot;text/css&quot; /&gt;');
			}
		}
	});
});
</pre>
<p><strong>Hojas de estilos predefinidas en el script:</strong><br />
<em>Internet Explorer 8.0</em> &#8211; <strong>ie8.css</strong><br />
<em>Internet Explorer 7.0</em> &#8211; <strong>ie7.css</strong><br />
<em>Internet Explorer 6.0</em> &#8211; <strong>ie6.css</strong><br />
<em>Mozilla Firefox</em> &#8211; <strong>mozilla.css</strong><br />
<em>Chrome</em> &#8211; <strong>chrome.css</strong><br />
<em>Opera</em> &#8211; <strong>opera.css</strong><br />
<em>Safari</em> &#8211; <strong>safari.css</strong></p>
<p><strong>Nota:</strong><br />
- Navegadores que soporta: IE8, IE7, IE6, Mozilla Firefox, Safari, Opera, Google Chrome<br />
- El script comprobará los ficheros en el directorio &#8216;css/browsers/nombre_del_navegador.css&#8217;.</p>
<p>Podéis ver el ejemplo <a target="_blank" href="http://dixso.net/wp-content/examples/jquery/jquery-browser-detect/" title="jQuery Browser Detect">aquí</a>.<br />
Descargar script: <a target="_blank" href="http://dixso.net/wp-content/examples/jquery/jquery-browser-detect/javascript/jquery.browser.detect.js" title="Descargar jQuery Browser Detect">aquí</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://dixso.net/jquery/jquery-browser-detect-1-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>50 Nuevas técnicas CSS</title>
		<link>http://dixso.net/css/50-nuevas-tecnicas-css/</link>
		<comments>http://dixso.net/css/50-nuevas-tecnicas-css/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 10:05:26 +0000</pubDate>
		<dc:creator>Julio</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://dixso.net/?p=459</guid>
		<description><![CDATA[En smashingmagazine.com han publicado 50 técnicas CSS, realmente es impresionante lo que se puede llegar hacer sobretodo con la esperada CSS3.
Más adelante pondré algunos ejemplos basados en algunas de estas técnicas y las explicaré paso a paso.
Aquí tenéis la noticia completa.
]]></description>
			<content:encoded><![CDATA[<p>En <a href="http://www.smashingmagazine.com" target="_blank">smashingmagazine.com</a> han publicado 50 técnicas CSS, realmente es impresionante lo que se puede llegar hacer sobretodo con la esperada CSS3.<br />
Más adelante pondré algunos ejemplos basados en algunas de estas técnicas y las explicaré paso a paso.<br />
Aquí tenéis la <a href="http://www.smashingmagazine.com/2009/07/20/50-new-css-techniques-for-your-next-web-design/" target="_blank">noticia </a>completa.</p>
]]></content:encoded>
			<wfw:commentRss>http://dixso.net/css/50-nuevas-tecnicas-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ocultar email con jQuery</title>
		<link>http://dixso.net/jquery/ocultar-email-con-jquery/</link>
		<comments>http://dixso.net/jquery/ocultar-email-con-jquery/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 16:23:32 +0000</pubDate>
		<dc:creator>Julio</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://dixso.net/?p=453</guid>
		<description><![CDATA[Con este pequeño script podremos ocultar el email contra los spammers.

$(function() {
	$('a.email').each(function(){
		e = this.rel.replace('(arroba)','@'); //Remplaza el texto '(arroba)' por '@'.
		this.href = 'mailto:' + e;
		$(this).text(e);
	});
});

Añadimos la clase al tag href y substituimos el &#8216;@&#8217; por el que queramos, en este caso &#8216;(arroba)&#8217;.
Ejemplo: aquí.
]]></description>
			<content:encoded><![CDATA[<p>Con este pequeño script podremos ocultar el email contra los spammers.</p>
<pre class="brush: jscript;">
$(function() {
	$('a.email').each(function(){
		e = this.rel.replace('(arroba)','@'); //Remplaza el texto '(arroba)' por '@'.
		this.href = 'mailto:' + e;
		$(this).text(e);
	});
});
</pre>
<p>Añadimos la clase al tag href y substituimos el &#8216;@&#8217; por el que queramos, en este caso &#8216;(arroba)&#8217;.<br />
Ejemplo: <a href="http://dixso.net/wp-content/examples/jquery/ocultar-email/" title="Ocultar email con jQuery" target="_blank">aquí</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://dixso.net/jquery/ocultar-email-con-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Invierte tu email mediante CSS para evitar el spam</title>
		<link>http://dixso.net/css/invierte-tu-email-mediante-css-para-evitar-el-spam/</link>
		<comments>http://dixso.net/css/invierte-tu-email-mediante-css-para-evitar-el-spam/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 07:28:22 +0000</pubDate>
		<dc:creator>Julio</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://dixso.net/?p=450</guid>
		<description><![CDATA[En sentidoweb he visto un artículo dónde explícan como invertir un texto mediante CSS, muy útil para insertar un email y que los spammers no te lo detecten..

&#60;style type=&#34;text/css&#34;&#62;
span.test { direction: rtl; unicode-bidi:bidi-override; }
&#60;/style&#62;
&#60;p&#62;&#60;span class=&#34;test&#34;&#62;moc.tset@tset&#60;/span&#62;&#60;/p&#62;

Muy útil e ingenioso pero al no poder poner un “mailto” no sirve de mucho, para estos casos mejor utilizar jQuery [...]]]></description>
			<content:encoded><![CDATA[<p>En <a target="_blank" href="http://sentidoweb.com/2009/06/22/invierte-tu-email-mediante-css-para-evitar-el-spam.php">sentidoweb</a> he visto un artículo dónde explícan como invertir un texto mediante CSS, muy útil para insertar un email y que los spammers no te lo detecten..</p>
<pre class="brush: xml;">
&lt;style type=&quot;text/css&quot;&gt;
span.test { direction: rtl; unicode-bidi:bidi-override; }
&lt;/style&gt;
&lt;p&gt;&lt;span class=&quot;test&quot;&gt;moc.tset@tset&lt;/span&gt;&lt;/p&gt;
</pre>
<p>Muy útil e ingenioso pero al no poder poner un “mailto” no sirve de mucho, para estos casos mejor utilizar jQuery para ocultar el código del email.</p>
]]></content:encoded>
			<wfw:commentRss>http://dixso.net/css/invierte-tu-email-mediante-css-para-evitar-el-spam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cufón, reemplazo de texto dinámico.</title>
		<link>http://dixso.net/javascript/cufon-reemplazo-de-texto-dinamico/</link>
		<comments>http://dixso.net/javascript/cufon-reemplazo-de-texto-dinamico/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 14:23:59 +0000</pubDate>
		<dc:creator>Julio</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://dixso.net/?p=440</guid>
		<description><![CDATA[Cufón aspira a convertirse en una buena alternativa a sIFR, consta de dos partes:
Un generador de fuentes que convierte las fuentes a un formato propietario y un motor de renderizado escrito en JavaScript, es decir, mediante canvas.
Modo de empleo:
- Añadimos la librería cufon-yui.js en nuestro head.
- Nos dirigimos al generador de fuentes (Importante: Las fuentes [...]]]></description>
			<content:encoded><![CDATA[<p><a target="_blank" title="Cufón" href="http://cufon.shoqolate.com/generate/">Cufón</a> aspira a convertirse en una buena alternativa a sIFR, consta de dos partes:<br />
Un generador de fuentes que convierte las fuentes a un formato propietario y un motor de renderizado escrito en JavaScript, es decir, mediante canvas.</p>
<p>Modo de empleo:<br />
- Añadimos la librería <a target="_blank" href="http://cufon.shoqolate.com/js/cufon-yui.js">cufon-yui.js</a> en nuestro head.<br />
- Nos dirigimos al <a target="_blank" title="generador de fuentes" href="http://cufon.shoqolate.com/generate/">generador de fuentes</a> (Importante: Las fuentes tienen que ser formato True Type).<br />
- Seleccionad vuestra fuente e incluimos los diferentes &#8220;glyphs&#8221; que necesitéis.<br />
- Envíamos el formulario y automaticamente se generará un script para descargarlo.<br />
- Añadir esa librería en vuestro head (Importante: Añadirlo justo después de la librería cufon-yui.js).</p>
<p>Para reemplazar el texto, añadimos lo siguiente en el head:</p>
<pre class="brush: jscript;">
&lt;script type=&quot;text/javascript&quot;&gt;
	Cufon('h1'); //Esto reemplazará el contenido del h1 por la tipo que hayamos añadido.
&lt;/script&gt;
</pre>
<p>Si queremos utilizar más de una tipo en nuestra web tendremos que hacer todos los pasos anteriores, es decir, añadir todos los scripts en el head y seguidamente añadir esto otro:</p>
<pre class="brush: jscript;">
&lt;script type=&quot;text/javascript&quot;&gt;
	Cufon.replace('h1', {fontFamily:'Slant'});
	Cufon.replace('h2', {fontFamily:'Starnberg'});
&lt;/script&gt;
</pre>
<p>Nota: Si utilizáis jQuery, podréis seleccionar más de un elemento de este modo:</p>
<pre class="brush: jscript;">
&lt;script type=&quot;text/javascript&quot;&gt;
	Cufon.replace('h1, h3, .capaElemento', {fontFamily:'Slant'});
	Cufon.replace('h2, p, #otraCapa', {fontFamily:'Starnberg'});
&lt;/script&gt;
</pre>
<p>Podéis ver un ejemplo: <a target="_blank" title="Cufón, reemplazo de texto dinámico." href="http://dixso.net/wp-content/examples/javascript/cufon/">aquí</a>.<br />
Existe una <a target="_blank" href="http://wiki.github.com/sorccu/cufon">wiki</a> de cufón para los que quieran saber más.</p>
]]></content:encoded>
			<wfw:commentRss>http://dixso.net/javascript/cufon-reemplazo-de-texto-dinamico/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS PopUp jQuery &amp; Ajax</title>
		<link>http://dixso.net/jquery/css-popup-jquery-ajax/</link>
		<comments>http://dixso.net/jquery/css-popup-jquery-ajax/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 13:00:13 +0000</pubDate>
		<dc:creator>Julio</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://dixso.net/?p=340</guid>
		<description><![CDATA[Este post es la segunda parte del primer post, ya que se ha mejorado el script.
Mejoras implementadas:
- El script añade automáticamente las capas, no hace falta insertar el código en cada página.
- Se carga el contenido por Ajax.
- Podemos pasarle parámetros de anchura de la capa.

//Variable que almacena la posición del scroll, por defecto tiene [...]]]></description>
			<content:encoded><![CDATA[<p>Este post es la segunda parte del <a href="http://dixso.net/jquery/css-popup-con-jquery/">primer post</a>, ya que se ha mejorado el script.</p>
<p><strong>Mejoras implementadas:</strong><br />
- El script añade automáticamente las capas, no hace falta insertar el código en cada página.<br />
- Se carga el contenido por Ajax.<br />
- Podemos pasarle parámetros de anchura de la capa.</p>
<pre class="brush: jscript;">
//Variable que almacena la posición del scroll, por defecto tiene valor 0.
scrollCachePosition = 0;
function popupCssShow (URL, width, height) { //Parámetros: URL (URL, Anchura de la capa, Altura de la capa)
	if (typeof document.body.style.maxHeight === &quot;undefined&quot;) {//Añade la propiedad maxHeight para IE6.
		$(&quot;body&quot;,&quot;html&quot;).css({height: &quot;100%&quot;, width: &quot;100%&quot;});
	}
	//La capa 'cssBackground' ocupa toda la pantalla para darle una opacidad.
	//La capa 'cssPopupContainer' es la capa madre del PopUp.
	if (!$(&quot;#cssBackground&quot;).length&gt;0) {
		$(&quot;body&quot;).append(&quot;&lt;div id=\&quot;cssBackground\&quot;&gt;&lt;/div&gt;&lt;div id=\&quot;cssPopupContainer\&quot;&gt;&lt;div id=\&quot;cssPopup\&quot;&gt;&lt;/div&gt;&lt;/div&gt;&quot;); //Añade las capas en la página.
	}
	if (width!=undefined) {
		$(&quot;#cssPopup&quot;).css(&quot;width&quot;,width);
	}
	if (height!=undefined) {
		$(&quot;#cssPopup&quot;).css(&quot;height&quot;,height);
		$(&quot;#cssPopup&quot;).css(&quot;overflow&quot;,&quot;auto&quot;);
	}
	$(&quot;#cssBackground&quot;).slideDown(&quot;slow&quot;); //Efecto jQuery
	scrollCachePosition = $(window).scrollTop();
	window.top.scroll(0,0);
	$(&quot;#cssPopup&quot;).load(URL,function(){
		//$(&quot;#cssPopupContainer&quot;).center(); //Si activamos esta línea y desactivamos la de abajo nos centrará el PopUp en el medio de la pantalla.
		$(&quot;#cssPopupContainer&quot;).css(&quot;top&quot;,50);
		ancho=$(window).width();
		$(&quot;#cssPopupContainer&quot;).slideDown(&quot;fast&quot;, function () {
			anchopopup=$(&quot;#cssPopup&quot;).width();
			$(&quot;#cssPopupContainer&quot;).css(&quot;width&quot;,ancho);
		});
	});
}

function popupCssHide () {
	$(&quot;#cssPopupContainer&quot;).slideUp(&quot;fast&quot;, function () {
		$(&quot;#cssBackground&quot;).fadeOut(&quot;fast&quot;,function () {
			$(&quot;#cssBackground&quot;).remove(); //Elimina la capa 'cssBackground'.
			$(&quot;#cssPopupContainer&quot;).remove(); //Elimina la capa 'cssPopupContainer'.
		});
	});
	if (scrollCachePosition &gt; 0) {
		window.top.scroll(0,scrollCachePosition); //Vuelve a la posición donde estaba el scroll.
		//Reseteamos la variable scrollCachePosition a 0 para poder ejecutar el script tantas veces como sea necesario.
		scrollCachePosition = 0;
	}
}
</pre>
<p>La hoja de estilos quedaría de la siguiente manera:</p>
<pre class="brush: css;">
#cssBackground 		{height:100%; width:100%; background-color:#000; display:none; position:fixed; top:0; left:0; z-index:100; float:left; opacity:0.65;}
#cssPopup 			{margin:0 auto;}
#cssPopupContainer 	{position:absolute; display:none; z-index:101; width:100%;}
</pre>
<p>Para que IE6 haga la opacidad y la posición fija tendremos que insertar álgún hack en un condicional en el ‘head’:</p>
<pre class="brush: xml;">
&lt;!--[if lt IE 7]&gt;
&lt;style type=&quot;text/css&quot; media=&quot;all&quot;&gt;
	#cssBackground {_position:absolute !important; filter:alpha(opacity=65);}
&lt;/style&gt;
&lt;![endif]--&gt;
</pre>
<p>Para que IE7 haga la opacidad insertamos lo siguiente con un condicional en el ‘head’:</p>
<pre class="brush: xml;">
&lt;!--[if IE 7]&gt;
&lt;style type=&quot;text/css&quot; media=&quot;all&quot;&gt;
	#cssBackground {filter:alpha(opacity=65);}
&lt;/style&gt;
&lt;![endif]--&gt;
</pre>
<p>Según la URL que venga añadirá un fichero u otro:<br />
Estructura del PopUp:</p>
<pre class="brush: php;">
&lt;?
if ($_GET['page']==&quot;pagina-1&quot;) {
	include (&quot;includes/pagina-1.php&quot;);
}elseif ($_GET['page']==&quot;pagina-2&quot;) {
	include (&quot;includes/pagina-2.php&quot;);
	}
?&gt;
</pre>
<p>Si le pasamos page=pagina-1 incluirá el fichero pagina-1.php tal y como lo pongo en la condición de arriba.</p>
<p>Para llamar al popup sería de la siguiente forma:</p>
<pre class="brush: xml;">&lt;a href=&quot;javascript:void(0);&quot; onclick=&quot;popupCssShow('popup.php?page=pagina-1', 460);&quot; title=&quot;Abrir PopUp&quot;&gt;Abrir PopUp&lt;/a&gt;</pre>
<p>También le pasamos el parámetro &#8216;460&#8242; para que nos habrá la ventana a &#8216;460px&#8217;.</p>
<p>Podéis ver un ejemplo <a target="_blank" href="http://dixso.net/wp-content/examples/jquery/css-popup-ajax">aquí</a>.<br />
Descarga del ejemplo <a href="http://dixso.net/wp-content/examples/jquery/css-popup-ajax/download/css-popup-ajax.rar">aquí</a>.</p>
<p>Nota:<br />
Para que os funcione tenéis que alojar el directorio en vuestro servidor o en local, ya que el ejemplo utilizo php para abrir un fichero u otro.</p>
]]></content:encoded>
			<wfw:commentRss>http://dixso.net/jquery/css-popup-jquery-ajax/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>jQuery Browser Detect</title>
		<link>http://dixso.net/jquery/jquery-browser-detect/</link>
		<comments>http://dixso.net/jquery/jquery-browser-detect/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 12:02:46 +0000</pubDate>
		<dc:creator>Julio</dc:creator>
				<category><![CDATA[Navegadores]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[IE7]]></category>
		<category><![CDATA[IE8]]></category>
		<category><![CDATA[Opera]]></category>
		<category><![CDATA[Safari]]></category>

		<guid isPermaLink="false">http://dixso.net/?p=394</guid>
		<description><![CDATA[Versión mejorada del script: aquí.
]]></description>
			<content:encoded><![CDATA[<p>Versión mejorada del script: <a href="http://dixso.net/jquery/jquery-browser-detect-1-1/">aquí</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://dixso.net/jquery/jquery-browser-detect/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Script Google Analytics</title>
		<link>http://dixso.net/google/script-google-analytics/</link>
		<comments>http://dixso.net/google/script-google-analytics/#comments</comments>
		<pubDate>Fri, 15 May 2009 13:04:06 +0000</pubDate>
		<dc:creator>Julio</dc:creator>
				<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://dixso.net/?p=386</guid>
		<description><![CDATA[Todos los que utilicen Google Analytics sabrán que la llamada al script se hace des de Google.
Inconvenientes hay muchos, los más importantes, si Google se cae (como hace un par de días sucedió) el script ga.js deja de funcionar y por lo tanto tu web se ve afectada con muchísimos errores, aparte de la lentitud [...]]]></description>
			<content:encoded><![CDATA[<p>Todos los que utilicen Google Analytics sabrán que la llamada al script se hace des de Google.<br />
Inconvenientes hay muchos, los más importantes, si Google se cae (como hace un par de días sucedió) el script ga.js deja de funcionar y por lo tanto tu web se ve afectada con muchísimos errores, aparte de la lentitud en carga de la web.</p>
<p>Otro inconveniente es cuando haces la petición del script a Google y en esos momentos Google tiene muchas peticiones a la vez, pues te tendrás que esperar tu turno, por lo tanto más lentitud en carga de tu web.</p>
<p>Por ello he decido publicar una noticia donde explico algunas alternativas bastantes interesantes.<br />
En <a target="_blank" href="http://www.anieto2k.com/2009/05/14/google-cae-y-caemos-todos/">anieto2k</a>, nos explican una posible solución bastante efectiva.</p>
<pre class="brush: jscript;">
var sc = document.createElement(&quot;script&quot;);
sc.type = &quot;text/javascript&quot;;
// SRC de Google
sc.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1.2/jquery.min.js?rand=' + Math.random();
var timer = setTimeout(function(){
   if (typeof jQuery == 'function') return;
        var sc = document.createElement(&quot;script&quot;);
        sc.type = &quot;text/javascript&quot;;
        // SRC local
        sc.src = 'http://www.anieto2k.com/wp-content/themes/anieto2k08/js/jquery-1.2.6.min.js';
        document.getElementsByTagName(&quot;head&quot;)[0].appendChild(sc);
   // Tiempo en milisegundos que estimamos pueda tardar.
}, 200);

sc.onload = sc.onreadystatechange =  function(e){
    clearTimeout(timer);
}
document.getElementsByTagName(&quot;head&quot;)[0].appendChild(sc);
</pre>
<p>Este pequeño script lo que hace es comprobar si el servicio está disponible, en caso de no estar disponible no lo deja ejecutar.</p>
<p>Sin embargo, en <a target="_blank" href="http://www.askapache.com/linux-unix/ga-urchin-speed.html">askapache.com</a> he visto como acelerar la velocidad de carga del script. La idea es tener el script ga.js en nuestro propio servidor, hacemos lo siguiente:</p>
<p>Cambiamos esto:</p>
<pre class="brush: jscript;">
&lt;script type=&quot;text/javascript&quot;&gt;
var gaJsHost = ((&quot;https:&quot; == document.location.protocol) ? &quot;https://ssl.&quot; : &quot;http://www.&quot;);
document.write(unescape(&quot;%3Cscript src='&quot; + gaJsHost + &quot;google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E&quot;));
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
var pageTracker = _gat._getTracker(&quot;UA-xxxxx-xx&quot;);
pageTracker._initData();
pageTracker._trackPageview();
&lt;/script&gt;
</pre>
<p>Por este otro script:</p>
<pre class="brush: jscript;">
&lt;script src=&quot;http://www.tudominio.com/js/google-analytics.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
var pageTracker = _gat._getTracker(&quot;UA-xxxxxx-xx&quot;);
pageTracker._initData();pageTracker._trackPageview();
&lt;/script&gt;
</pre>
<p>Con que el código ga.js lo pueden modificar para hacer algunas mejoras, tendremos que crear un cron para que cada cierto tiempo compruebe si ha habido cambios en el fichero, si se diera el caso, el cron copiaría el fichero y lo almacenaría en un directorio temporal y lo substituiría en el directorio dónde se encuentre en el servidor.</p>
<pre class="brush: plain;">
#!/bin/sh 

# TMP DIRECTORY
MYTMP=/tmp/ 

# SAVE ga.js HERE
INSTALL_IN=/var/www/nombredetudominio.com/httpdocs/js/ 

# RESOURCE URLS
GOOGLE_GA_URL=http://www.google-analytics.com/ga.js 

# USER-AGENT
UA=&quot;Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3&quot; 

# CD TO TMP DIRECTORY
cd $MYTMP 

# DOWNLOAD THE FILE
curl --header &quot;Pragma:&quot; -f -s -A &quot;${UA}&quot; -m 1800 --retry 15 --retry-delay 15 --max-redirs 8 -O $GOOGLE_GA_URL 

# GIVE FILE CORRECT PERMISSIONS
chmod 644 $MYTMP/ga.js 

# COPY FILE TO SITE DIRECTORY
cp -r $MYTMP/ga.js $INSTALL_IN 

# RETURN TO OLDPWD
cd $OLDPWD 

exit 0;
</pre>
<p>¿Qué pensáis de estas dos posibles soluciones, os parecen factibles?<br />
¿Tenéis alguna otra idea mejor o similar a las comentadas?<br />
<strong>¡Dime tu opinión!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://dixso.net/google/script-google-analytics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
