<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-257684801037723070</id><updated>2024-11-06T03:57:46.561+01:00</updated><category term="html"/><category term="javascript"/><category term="css"/><category term="php"/><category term="jquery"/><category term="ajax"/><category term="diseño web"/><category term="explorer"/><category term="google"/><category term="mysql"/><title type='text'>Apuntes en la web</title><subtitle type='html'>Desarrollo Web, PHP, CSS, XHTML, Javascript,ActionScript ...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://apuntesenlaweb.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://apuntesenlaweb.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>apuntes en la web</name><uri>http://www.blogger.com/profile/15160833806931593660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>21</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-257684801037723070.post-8879370351059008507</id><published>2010-11-11T13:38:00.002+01:00</published><updated>2010-11-11T14:41:32.539+01:00</updated><title type='text'>Mostrar página en una paginación</title><content type='html'>En el este artículos mostramos un algoritmo PHP para mostrar el número de paginas en una paginación.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.laserranianoticias.es/ejemplos/paginar.php?pag=7&quot;&gt;Ejemplo&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.laserranianoticias.es/cv/wp-content/uploads/2010/11/paginacion.jpg&quot;&gt;&lt;img src=&quot;http://www.laserranianoticias.es/cv/wp-content/uploads/2010/11/paginacion.jpg&quot; alt=&quot;&quot; title=&quot;paginacion&quot; class=&quot;alignnone size-full wp-image-60&quot; width=&quot;247&quot; height=&quot;35&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt; &lt;code&gt;&lt;br /&gt; [C&amp;Oacute;DIGO PHP]&lt;br/&gt;&lt;br/&gt;&lt;br /&gt;&lt;span class=&quot;azul&quot;&gt;$pagina&lt;/span&gt;=(&lt;span class=&quot;verde&quot;&gt;isset&lt;/span&gt;(&lt;span class=&quot;azul&quot;&gt;$_GET&lt;/span&gt;[&lt;span class=&quot;rojo&quot;&gt;&#39;pag&#39;&lt;/span&gt;]))?&lt;span class=&quot;azul&quot;&gt;$_GET&lt;/span&gt;[&#39;&lt;span class=&quot;rojo&quot;&gt;pag&lt;/span&gt;&#39;]:&lt;span class=&quot;rojo&quot;&gt;15&lt;/span&gt;;&lt;br /&gt;&lt;span class=&quot;azul&quot;&gt;$paginas&lt;/span&gt;=(&lt;span class=&quot;verde&quot;&gt;isset&lt;/span&gt;(&lt;span class=&quot;azul&quot;&gt;$_GET&lt;/span&gt;[&lt;span class=&quot;rojo&quot;&gt;&#39;total&lt;/span&gt;&#39;]))?&lt;span class=&quot;azul&quot;&gt;$_GET&lt;/span&gt;[&#39;&lt;span class=&quot;rojo&quot;&gt;total&lt;/span&gt;&#39;]:&lt;span class=&quot;rojo&quot;&gt;50&lt;/span&gt;;&lt;br /&gt;&lt;span class=&quot;azul&quot;&gt;$pagVisible&lt;/span&gt; =(&lt;span class=&quot;verde&quot;&gt;isset&lt;/span&gt;(&lt;span class=&quot;azul&quot;&gt;$_GET&lt;/span&gt;[&lt;span class=&quot;rojo&quot;&gt;&#39;visible&lt;/span&gt;&#39;]))?&lt;span class=&quot;azul&quot;&gt;$_GET&lt;/span&gt;[&#39;&lt;span class=&quot;rojo&quot;&gt;visible&lt;/span&gt;&#39;]:&lt;span class=&quot;rojo&quot;&gt;4&lt;/span&gt;; &lt;span class=&quot;naranja&quot;&gt;/* Ademas de la pagina actual&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;naranja&quot;&gt;/* PRIMERA P&amp;Aacute;GINA */&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;verde&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;azul&quot;&gt;$pagina&lt;/span&gt; &amp;gt (&lt;span class=&quot;azul&quot;&gt;$pagVisible&lt;/span&gt;/&lt;span class=&quot;rojo&quot;&gt;2&lt;/span&gt;)+&lt;span class=&quot;rojo&quot;&gt;1&lt;/span&gt;) &lt;span class=&quot;verde&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;gris&quot;&gt;&quot;&amp;lt;a href=&#39;?pag=1&#39; &amp;gt    1   &amp;gt /a&amp;lt  ... &quot;&lt;/span&gt;; &lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;verde&quot;&gt;for&lt;/span&gt;(&lt;span class=&quot;azul&quot;&gt;$p&lt;/span&gt;=1;&lt;span class=&quot;azul&quot;&gt;$p&lt;/span&gt; &amp;lt= &lt;span class=&quot;azul&quot;&gt;$paginas&lt;/span&gt;;&lt;span class=&quot;azul&quot;&gt;$p&lt;/span&gt;++) {&lt;br /&gt; &lt;span class=&quot;verde&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;azul&quot;&gt;$pagina&lt;/span&gt;-1&amp;gt &lt;span class=&quot;azul&quot;&gt;$pagVisible&lt;/span&gt;/&lt;span class=&quot;rojo&quot;&gt;2&lt;/span&gt;)  {&lt;br /&gt;  &lt;span class=&quot;verde&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;azul&quot;&gt;$pagina&lt;/span&gt; &amp;gt  (&lt;span class=&quot;azul&quot;&gt;$paginas&lt;/span&gt; - &lt;span class=&quot;azul&quot;&gt;$pagVisible&lt;/span&gt;/&lt;span class=&quot;rojo&quot;&gt;2&lt;/span&gt;) &amp;&amp; (&lt;span class=&quot;azul&quot;&gt;$p&lt;/span&gt; &amp;lt  &lt;span class=&quot;azul&quot;&gt;$paginas&lt;/span&gt; -&lt;span class=&quot;azul&quot;&gt;$pagVisible&lt;/span&gt;))  &lt;span class=&quot;verde&quot;&gt;continue&lt;/span&gt;;&lt;br /&gt;  &lt;span class=&quot;verde&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;azul&quot;&gt;$p&lt;/span&gt; &amp;lt  (&lt;span class=&quot;azul&quot;&gt;$pagina&lt;/span&gt;-&lt;span class=&quot;azul&quot;&gt;$pagVisible&lt;/span&gt;/&lt;span class=&quot;rojo&quot;&gt;2&lt;/span&gt;) &amp;&amp; (&lt;span class=&quot;azul&quot;&gt;$paginas&lt;/span&gt; &amp;gt =(&lt;span class=&quot;azul&quot;&gt;$pagina&lt;/span&gt;+&lt;span class=&quot;azul&quot;&gt;$pagVisible&lt;/span&gt;/&lt;span class=&quot;rojo&quot;&gt;2&lt;/span&gt;))) &lt;span class=&quot;verde&quot;&gt;continue&lt;/span&gt;; &lt;br /&gt;  &lt;span class=&quot;verde&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;azul&quot;&gt;$p&lt;/span&gt;&amp;gt  (&lt;span class=&quot;azul&quot;&gt;$pagina&lt;/span&gt;+&lt;span class=&quot;azul&quot;&gt;$pagVisible&lt;/span&gt;/&lt;span class=&quot;rojo&quot;&gt;2&lt;/span&gt;)) &lt;span class=&quot;verde&quot;&gt;break&lt;/span&gt;;&lt;br /&gt; } &lt;span class=&quot;verde&quot;&gt;else&lt;/span&gt; {&lt;br /&gt;  &lt;span class=&quot;verde&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;azul&quot;&gt;$p&lt;/span&gt; &amp;gt  &lt;span class=&quot;azul&quot;&gt;$pagVisible&lt;/span&gt;+1) &lt;span class=&quot;verde&quot;&gt;&lt;span class=&quot;verde&quot;&gt;break&lt;/span&gt;&lt;/span&gt;;&lt;br /&gt; }&lt;br /&gt;  &lt;span class=&quot;verde&quot;&gt;echo&lt;/span&gt; (&lt;span class=&quot;azul&quot;&gt;$p&lt;/span&gt;==&lt;span class=&quot;azul&quot;&gt;$pagina&lt;/span&gt;)?&lt;span class=&quot;gris&quot;&gt;&quot;&amp;lt;b&amp;gt;   &quot;&lt;/span&gt;.$p.&lt;span class=&quot;gris&quot;&gt;&quot; &amp;lt;/b&amp;gt;   &quot;&lt;/span&gt;:&lt;span class=&quot;gris&quot;&gt;&quot;&amp;lt;a href=&#39;?pag=&quot;&lt;/span&gt;.($p).&lt;span class=&quot;gris&quot;&gt;&quot;&#39;&amp;gt; $p &amp;lt/a&amp;gt &quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;} &lt;br /&gt;&lt;span class=&quot;naranja&quot;&gt;/* FIN DEL BUCLE FOR */&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;naranja&quot;&gt;/* &amp;Uacute;LTIMA P&amp;Aacute;GINA */&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;verde&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;azul&quot;&gt;$pagina&lt;/span&gt;&amp;lt &lt;span class=&quot;azul&quot;&gt;$paginas&lt;/span&gt;-(&lt;span class=&quot;azul&quot;&gt;$pagVisible&lt;/span&gt;/&lt;span class=&quot;rojo&quot;&gt;2&lt;/span&gt;)) &lt;span class=&quot;verde&quot;&gt;echo&lt;/span&gt;&lt;span class=&quot;gris&quot;&gt; &quot; .... &amp;lt;a href=&#39;?pag=&quot;&lt;/span&gt;.(&lt;span class=&quot;azul&quot;&gt;$paginas&lt;/span&gt;).&lt;span class=&quot;gris&quot;&gt;&quot;&#39;&amp;gt $paginas &amp;lt/a&amp;gt &quot;&lt;/span&gt;;  &lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt; &lt;br /&gt;&lt;/pre&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/8879370351059008507'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/8879370351059008507'/><link rel='alternate' type='text/html' href='http://apuntesenlaweb.blogspot.com/2010/11/mostrar-pagina-en-una-paginacion.html' title='Mostrar página en una paginación'/><author><name>apuntes en la web</name><uri>http://www.blogger.com/profile/15160833806931593660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-257684801037723070.post-6198324546092077023</id><published>2010-10-21T13:46:00.002+02:00</published><updated>2010-10-21T13:49:11.636+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="diseño web"/><title type='text'>25 herramientas para el diseño web</title><content type='html'>Hoy mostramos un listado con 25 herramientas para el diseño web que van desde plugin firefox a herramientas online&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://pelfusion.com/tools/25-important-web-design-tools/&quot;&gt;http://pelfusion.com/tools/25-important-web-design-tools/&lt;/a&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/6198324546092077023'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/6198324546092077023'/><link rel='alternate' type='text/html' href='http://apuntesenlaweb.blogspot.com/2010/10/25-herramientas-para-el-diseno-web.html' title='25 herramientas para el diseño web'/><author><name>apuntes en la web</name><uri>http://www.blogger.com/profile/15160833806931593660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-257684801037723070.post-3361936722261555568</id><published>2010-10-20T20:57:00.001+02:00</published><updated>2010-10-20T20:58:35.753+02:00</updated><title type='text'>CSS3 Generator</title><content type='html'>Hoy les mostramos una interesante página para crear estilos CSS3&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;http://css3generator.com/&quot;&gt;http://css3generator.com/&lt;/a&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/3361936722261555568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/3361936722261555568'/><link rel='alternate' type='text/html' href='http://apuntesenlaweb.blogspot.com/2010/10/css3-generator.html' title='CSS3 Generator'/><author><name>apuntes en la web</name><uri>http://www.blogger.com/profile/15160833806931593660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-257684801037723070.post-4859445171229896465</id><published>2010-10-18T10:41:00.002+02:00</published><updated>2010-10-18T10:48:59.331+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="css"/><category scheme="http://www.blogger.com/atom/ns#" term="html"/><title type='text'>Nuevas propiedades en CSS 3</title><content type='html'>Poco a poco CSS 3 se va convirtiendo en un realidad. Hemos encontrado una web con claro ejemplos sobres las nuevas propieda &lt;a href=&quot;http://www.impressivewebs.com/css3-click-chart/&quot;&gt;www.impressivewebs.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;En esta otra web encontramos utiles chuletas sobre CSS3 y HTML 5  &lt;a href=&quot;http://www.webresourcesdepot.com/html-5-and-css3-cheat-sheets-collection/&quot;&gt;http://www.webresourcesdepot.com/&lt;/a&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/4859445171229896465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/4859445171229896465'/><link rel='alternate' type='text/html' href='http://apuntesenlaweb.blogspot.com/2010/10/nuevas-propiedades-en-css-3.html' title='Nuevas propiedades en CSS 3'/><author><name>apuntes en la web</name><uri>http://www.blogger.com/profile/15160833806931593660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-257684801037723070.post-3395370291973093877</id><published>2010-10-17T23:34:00.001+02:00</published><updated>2010-10-17T23:36:32.543+02:00</updated><title type='text'>HTML5 + CSS3 + Javascript: Cada vez más y mejor</title><content type='html'>&lt;p&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Google, Microsoft y Apple&lt;/span&gt; ya han hecho su apuesta:&lt;span style=&quot;font-weight:bold;&quot;&gt; HTML5 + CSS3 + Javascript&lt;/span&gt;. ¿Qué significan estas siglas? &lt;span style=&quot;font-weight:bold;&quot;&gt;Páginas web mucho más ricas, completas, interactivas e interesantes &lt;/span&gt;que las que se hacen hoy en día. Infinitas posibilidades con gráficos e imágenes vectoriales, fotos, vídeos y otros elementos.&lt;/p&gt;&lt;br/&gt;&lt;br /&gt;&lt;a href=&quot;http://www.elmundo.es/blogs/elmundo/catalejo/2010/06/24/html5-css3-javascript-cada-vez-mas-y.html&quot;&gt;Articulo completo en El Mundo&lt;/a&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/3395370291973093877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/3395370291973093877'/><link rel='alternate' type='text/html' href='http://apuntesenlaweb.blogspot.com/2010/10/html5-css3-javascript-cada-vez-mas-y.html' title='HTML5 + CSS3 + Javascript: Cada vez más y mejor'/><author><name>apuntes en la web</name><uri>http://www.blogger.com/profile/15160833806931593660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-257684801037723070.post-2949284831240608793</id><published>2010-10-15T17:00:00.002+02:00</published><updated>2010-10-15T17:07:02.917+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="html"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="jquery"/><title type='text'>Desplazamiento animado en anclas de enlaces con jQuery</title><content type='html'>&lt;p&gt;En este artículo explico como animar los desplazamientos dentro de una misma página. Tan solo haría falta este sencillo script y cargar la libreria jQuery. En esta &lt;a href=&quot;http://css-tricks.com/examples/SmoothPageScroll/&quot;&gt;pagina&lt;/a&gt; poder ver un ejemplo de dicha animación&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;$(function(){&lt;br /&gt;&lt;br /&gt;     $(&#39;a[href*=#]&#39;).click(function() {&lt;br /&gt;&lt;br /&gt;     if (location.pathname.replace(/^\//,&#39;&#39;) == this.pathname.replace(/^\//,&#39;&#39;)&lt;br /&gt;         &amp;&amp; location.hostname == this.hostname) {&lt;br /&gt;&lt;br /&gt;             var $target = $(this.hash);&lt;br /&gt;&lt;br /&gt;             $target = $target.length &amp;&amp; $target || $(&#39;[name=&#39; + this.hash.slice(1) +&#39;]&#39;);&lt;br /&gt;&lt;br /&gt;             if ($target.length) {&lt;br /&gt;&lt;br /&gt;                 var targetOffset = $target.offset().top;&lt;br /&gt;&lt;br /&gt;                 $(&#39;html,body&#39;).animate({scrollTop: targetOffset}, 1000);&lt;br /&gt;&lt;br /&gt;                 return false;&lt;br /&gt;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;   });&lt;br /&gt;&lt;br /&gt;});&lt;/code&gt;&lt;/pre&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/2949284831240608793'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/2949284831240608793'/><link rel='alternate' type='text/html' href='http://apuntesenlaweb.blogspot.com/2010/10/desplazamiento-animado-en-anclas-de.html' title='Desplazamiento animado en anclas de enlaces con jQuery'/><author><name>apuntes en la web</name><uri>http://www.blogger.com/profile/15160833806931593660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-257684801037723070.post-738484239514583198</id><published>2010-09-21T19:33:00.005+02:00</published><updated>2010-09-21T19:41:43.958+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="jquery"/><title type='text'>10 Codigo jQuery</title><content type='html'>&lt;a href=&quot;http://www.bufa.es/10-codigos-jquery/&quot;&gt;10 Codigo jQuery&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Añadir una clase css a un elemento&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Una forma muy limpio para cambiar un elemento de apariencia es agregar una clase css, en vez de añadir los estilos en línea. Usando jQuery, esto es bastante fácil de hacer:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;$(&#39;#midiv&#39;).addClass(&#39;miclase&#39;);&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Quitar una clase css a un elemento&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Es genial ser capaz de añadir algunas clases CSS, pero también tenemos que saber cómo eliminar las clases no deseados. La siguiente línea de código hará que:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;$(&#39;#midiv&#39;).removeClass(&#39;miclase&#39;);&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Comprar si un elemento tiene una determinada clase css&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Si su aplicación o sitio suele agregar y quitar las clases a un elemento particular, puede ser muy útil para poder comprobar si un elemento tiene una cierta clase CSS&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;$(id).hasClass(&#39;miclase&#39;)&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Cambiar hoja de estilos con jQuery&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Como vimos en los ejemplos anteriores, agregando o quitando los estilos CSS a un elemento es muy sencilla, utilizando jQuery. Pero lo que si quiere eliminar completamente el documento de archivo css y adjuntar una hoja de estilo nuevo? Una buena noticia, es muy simple, así, como se muestra en el ejemplo siguiente:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;$(&#39;link[media=&#39;screen&#39;]&#39;).attr(&#39;href&#39;, &#39;otroestilo.css&#39;);&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Añadir código html a un elemento&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Cuando tenga que añadir algo de HTML a un elemento, el método append () es un protector de la vida:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;$(&#39;#midiv&#39;).append(&#39;voy a añadir todo este &lt;strong&gt;texto&lt;/strong&gt; html&#39;);&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Comprobar si existe un elemento&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Cuando se trabaja con JavaScript, con frecuencia necesitamos para comprobar si un elemento existe o no. Usando jQuery y la propiedad length, es muy simple de hacer: Si la longitud == 0, no se utilizan elementos de la página.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;if ($(&#39;img&#39;).length) {&lt;br /&gt;    log(&#39;Si hay imagenes&#39;);&lt;br /&gt;} else {&lt;br /&gt;    log(&#39;No hay imagenes&#39;);&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Obtener el elemento primario de un elemento&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Al trabajar con el DOM, es posible que necesite saber qué elemento es el padre directo de otro elemento. El más cercano () método le permitirá saber:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;var id = $(&quot;button&quot;).closest(&quot;div&quot;).attr(&quot;id&quot;);&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Obtener los hermanos de un elemento&lt;br /&gt;&lt;br /&gt;la función siblings() es una herramienta muy útil para conseguir los hermanos de un elemento. Como se muestra a continuación, utilizando este método es muy simple:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;$(&quot;div&quot;).siblings()&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Quitar una opción de una lista de selección&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Cuando se trabaja con listas de selección, es posible que desee actualizar el contenido de acuerdo con las acciones del usuario. Para eliminar una opción de una lista de selección, el siguiente código hará el truco:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;$(&quot;#miselect option[value=&#39;2&#39;]&quot;).remove();&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Accede a la opción seleccionada como texto&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Muy útil cuando se necesita para comprobar rápidamente lo que un visitante seleccionados de su lista de selección.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;$(&#39;#miselect :selected&#39;).text();&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Aplicar un “efecto cebra” en las tablas&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Cuando utilice tablas, es una buena idea, para facilitar la lectura, para dar un estilo diferente a una línea de cada dos. Usando jQuery, esto se puede hacer fácilmente, sin ningún tipo de código HTML adicional.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;$(&quot;tr:odd&quot;).addClass(&quot;odd&quot;);&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Contar los hijos de un elemento&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Si deseas contar cuántos elementos son hijos de otro determinado elemento:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;$(&quot;#midiv &amp;gt; div&quot;).length;&lt;/code&gt;&lt;/pre&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/738484239514583198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/738484239514583198'/><link rel='alternate' type='text/html' href='http://apuntesenlaweb.blogspot.com/2010/09/10-codigo-jquery.html' title='10 Codigo jQuery'/><author><name>apuntes en la web</name><uri>http://www.blogger.com/profile/15160833806931593660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-257684801037723070.post-134327512977996887</id><published>2010-09-21T19:32:00.001+02:00</published><updated>2010-09-21T19:32:40.480+02:00</updated><title type='text'>Top 10 Google Street View Photobombs</title><content type='html'>&lt;a href=&quot;http://www.rockingfundas.com/2010/08/top-10-google-street-view-photobombs.html&quot;&gt;Top 10 Google Street View Photobombs&lt;/a&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/134327512977996887'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/134327512977996887'/><link rel='alternate' type='text/html' href='http://apuntesenlaweb.blogspot.com/2010/09/top-10-google-street-view-photobombs.html' title='Top 10 Google Street View Photobombs'/><author><name>apuntes en la web</name><uri>http://www.blogger.com/profile/15160833806931593660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-257684801037723070.post-7282803044358868325</id><published>2010-09-21T19:29:00.000+02:00</published><updated>2010-09-21T19:30:56.498+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="google"/><title type='text'>Los vacios de google maps</title><content type='html'>Cuarteles militares, centrales nucleares, edificios oficiales... los objetivos del pixel o el &quot;capeado&quot; de Google Maps son muy distintos aunque los motivos que están detras de la imagen borrosa son casi siempre la censura o salvaguardar la seguridad.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://noticias.lainformacion.com/arte-cultura-y-espectaculos/internet/los-vacios-en-google-maps_BAhzlRlfS2ATUNTVh8NSk2/&quot;&gt;Los vacios en google maps&lt;/a&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/7282803044358868325'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/7282803044358868325'/><link rel='alternate' type='text/html' href='http://apuntesenlaweb.blogspot.com/2010/09/los-vacios-de-google-maps.html' title='Los vacios de google maps'/><author><name>apuntes en la web</name><uri>http://www.blogger.com/profile/15160833806931593660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-257684801037723070.post-392949228082211189</id><published>2010-07-20T14:56:00.004+02:00</published><updated>2010-07-20T15:02:16.184+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="php"/><title type='text'>Forzar las descargar de archivos con PHP</title><content type='html'>A veces cuando queremos mostrar los documentos , ya sean .doc, .pdf ... , queremos que aparezca el cuadro de diálogo de abrir o guardar en vez de que se nos abra en otra ventanda. Para ello usamos el siguiente código para forzar la descarga.&lt;br /&gt;&lt;br /&gt;CODIGO PHP [DOCUMENTO DESCARGAR.PHP]&lt;br /&gt;&lt;pre&gt;&lt;code&gt; &amp;lt;?php&lt;br /&gt;    $f=$_GET[&quot;f&quot;];&lt;br /&gt; $f=&quot;RUTA DEL DOCUMENTO&quot;.$f;&lt;br /&gt;    header(&quot;Content-type: application/octet-stream&quot;);&lt;br /&gt;    header(&quot;Content-Disposition: attachment; filename=\&quot;$f\&quot;\n&quot;);&lt;br /&gt;    $fp=fopen(&quot;$f&quot;, &quot;r&quot;);&lt;br /&gt;    fpassthru($fp);&lt;br /&gt;?&amp;gt; &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;CODIGO HTML&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt; &amp;lt;a href=&quot;descargar.php?f= &amp;lt;?php echo $row[&#39;documento&#39;] ?&amp;gt;&quot; class=&quot;textogris&quot;   style=&quot;float:right&quot; target=&quot;_blank&quot;&amp;gt;Ver documento&amp;lt;/a&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/392949228082211189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/392949228082211189'/><link rel='alternate' type='text/html' href='http://apuntesenlaweb.blogspot.com/2010/07/forzar-las-descargar-de-archivos-con.html' title='Forzar las descargar de archivos con PHP'/><author><name>apuntes en la web</name><uri>http://www.blogger.com/profile/15160833806931593660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-257684801037723070.post-3165868965486693774</id><published>2010-07-08T21:50:00.002+02:00</published><updated>2010-07-08T21:56:04.944+02:00</updated><title type='text'>SEO: el arte de posicionarse en Internet</title><content type='html'>El SEO y sus especialistas se han convertido en un objeto de deseo cada vez más perseguido por las empresas con intereses en la Red&lt;br /&gt;&lt;br /&gt;Entre las palabras que Internet ha traído a nuestro vocabulario cotidiano, ´SEO´ es sin duda una de las más populares y también de las más enigmáticas. El misterio que este acrónimo de tres letras encierra es la expresión “Search Engine Optimization” que podría traducirse como “Optimización para motores de búsqueda”. Básicamente, SEO es la forma en la que conseguimos que una página web alcance la mayor relevancia posible a ojos de un buscador (Google, Yahoo, Bing, etc.) de tal modo que ese buscador muestre esa página en los primeros lugares cuando se hace una búsqueda que guarda relación temática con los contenidos de esa web. La relevancia con respecto a un buscador no es cuestión baladí para un sitio web: condiciona gran parte de su éxito o de su fracaso. De ahí que el SEO y sus especialistas se hayan convertido en un objeto de deseo cada vez más perseguido por las empresas con intereses en la Red.&lt;br /&gt;&lt;br /&gt;Artículo de Levante:&lt;br /&gt;&lt;a href=&quot;http://http://www.levante-emv.com/tecnologia/2010/07/08/seo-arte-posicionarse-internet/721231.html&quot;&gt;SEO: el arte de posicionarse en Internet&lt;/a&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/3165868965486693774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/3165868965486693774'/><link rel='alternate' type='text/html' href='http://apuntesenlaweb.blogspot.com/2010/07/seo-el-arte-de-posicionarse-en-internet.html' title='SEO: el arte de posicionarse en Internet'/><author><name>apuntes en la web</name><uri>http://www.blogger.com/profile/15160833806931593660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-257684801037723070.post-4641730369279661844</id><published>2010-07-07T00:21:00.004+02:00</published><updated>2010-07-07T00:26:03.043+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="html"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><title type='text'>Pantalla completa con javascript</title><content type='html'>&lt;a href=&quot;javascript:void(0);&quot; onClick=&quot;window.open(&#39;http://www.apuntesenlaweb.blogspot.com/&#39;, &#39;&#39;, &#39;fullscreen=yes, scrollbars=auto&#39;);&quot;&gt;Abrir una ventana en Pantalla Completa.&lt;/a&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;javascript:void(0);&quot; &lt;br /&gt;onClick=&quot;window.open(&#39;http://www.apuntesenlaweb.blogspot.com/&#39;, &#39;&#39;, &#39;fullscreen=yes, scrollbars=auto&#39;);&quot;&amp;t;Abrir una ventana en Pantalla Completa.&amp;lt;/a&amp;t;&lt;/code&gt;&lt;/pre&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/4641730369279661844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/4641730369279661844'/><link rel='alternate' type='text/html' href='http://apuntesenlaweb.blogspot.com/2010/07/pantalla-completa-con-javascript.html' title='Pantalla completa con javascript'/><author><name>apuntes en la web</name><uri>http://www.blogger.com/profile/15160833806931593660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-257684801037723070.post-7472005610832482735</id><published>2010-06-08T11:42:00.003+02:00</published><updated>2010-06-08T11:51:50.039+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="css"/><category scheme="http://www.blogger.com/atom/ns#" term="jquery"/><title type='text'>Modificar dimensiones de la página</title><content type='html'>Para aumentar TODAS las dimensiones de una pagina de todos debe estar en em nada en px, después debemos modificar mediante javascript el valor de la fuente del body, en resto de dimensiones heredaran de estan&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;a href=&quot;#&quot; class=&quot;aumFuente&quot; title=&quot;Aumentar&quot;&amp;gt;+&amp;lt;/a&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Creamos una funcion con jQuery que multiplique el valor por 1,1 hasta un máximo de 18&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$(&quot;.aumFuente&quot;).click(function(){&lt;br /&gt;        var tamActual = $(&quot;body&quot;).css(&quot;font-size&quot;);&lt;br /&gt; var tamActualNum = parseFloat(tamActual, 10);&lt;br /&gt; //18 es el tamaño máximo&lt;br /&gt; if (tamActualNum&gt;18) nuevaFuente=tamActualNum;&lt;br /&gt; else nuevaFuente = tamActualNum*1.1;&lt;br /&gt; &lt;br /&gt; $(&quot;body&quot;).css(&quot;font-size&quot;, nuevaFuente);&lt;br /&gt;         //Se guarda en tamaño en un cookie&lt;br /&gt; SetCookie (&quot;letra&quot;, parseFloat(nuevaFuente)) &lt;br /&gt; return false;&lt;br /&gt;});&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Para mantener el valor para la próxima visita lo guardamos en una cookie&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;function SetCookie (name, value) {&lt;br /&gt; // nmero de parmetros variable.&lt;br /&gt; var argv = SetCookie.arguments;&lt;br /&gt; var argc = SetCookie.arguments.length;&lt;br /&gt; // asociacin de parmetros a los campos cookie. &lt;br /&gt; var expires = (argc &gt; 2) ? argv[2] : null&lt;br /&gt; var path = (argc &gt; 3) ? argv[3] : null&lt;br /&gt; var domain = (argc &gt; 4) ? argv[4] : null&lt;br /&gt; var secure = (argc &gt; 5) ? argv[5] : false&lt;br /&gt; // asignacin de la propiedad tras la codificacin URL&lt;br /&gt;&lt;br /&gt; document.cookie = name + &quot;=&quot; + escape(value)&lt;br /&gt;  &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/7472005610832482735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/7472005610832482735'/><link rel='alternate' type='text/html' href='http://apuntesenlaweb.blogspot.com/2010/06/modificar-dimensiones-de-la-pagina.html' title='Modificar dimensiones de la página'/><author><name>apuntes en la web</name><uri>http://www.blogger.com/profile/15160833806931593660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-257684801037723070.post-392557150407549193</id><published>2010-06-01T14:54:00.001+02:00</published><updated>2010-06-01T14:56:45.199+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="css"/><title type='text'>Transpariencias con CSS</title><content type='html'>&lt;pre&gt;&lt;code&gt;&lt;br /&gt;.transpariencia{&lt;br /&gt;    filter:alpha(opacity=70); /* IE */&lt;br /&gt;    -moz-opacity:0.7; /* Firefox, Opera, ... */&lt;br /&gt;    opacity: 0.7; /* CSS 3*/&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Transpariencia al 70% con los distintos navegadores.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/392557150407549193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/392557150407549193'/><link rel='alternate' type='text/html' href='http://apuntesenlaweb.blogspot.com/2010/06/transpariencias-con-css.html' title='Transpariencias con CSS'/><author><name>apuntes en la web</name><uri>http://www.blogger.com/profile/15160833806931593660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-257684801037723070.post-6281858963134101033</id><published>2010-05-25T19:33:00.003+02:00</published><updated>2010-05-25T19:42:18.178+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="html"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><title type='text'>Detectar ancla en la url con javascript</title><content type='html'>La propiedad document.location.hash. obtiene la parte de la url después de #. Con esto podemos obtener el nombre de un elemento el cual podemos modificar con javascript &lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;&lt; script languaje = &quot;javascript&quot; &gt; &lt;br /&gt;// verificar si viene un ancla &lt;br /&gt;if (document.location.hash != &quot;&quot;) &lt;br /&gt;{    &lt;br /&gt; var elemento = document.location.hash.replace(&quot;#&quot;,&quot;&quot;); &lt;br /&gt; document.getElementById(elemento). style.color= &#39;#fff&#39;; &lt;br /&gt;} &lt;br /&gt;&lt;/ script &gt; &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;En este caso el elemento que pasemos por la URL le cambiamos el color</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/6281858963134101033'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/6281858963134101033'/><link rel='alternate' type='text/html' href='http://apuntesenlaweb.blogspot.com/2010/05/detectar-ancla-en-la-url-con-javascript.html' title='Detectar ancla en la url con javascript'/><author><name>apuntes en la web</name><uri>http://www.blogger.com/profile/15160833806931593660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-257684801037723070.post-5305558334685949052</id><published>2010-05-18T00:29:00.005+02:00</published><updated>2010-05-18T00:51:50.672+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="html"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><title type='text'>Activar todos los checkbox de una página</title><content type='html'>&lt;pre&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;a href=&quot;#&quot; onclick=&quot;activar(1); return false;&quot; &amp;gt;Marcar todos&amp;lt;/a&amp;gt; /&lt;br /&gt;&amp;lt;a href=&quot;#&quot; onclick=&quot;activar(0);return false;&quot; &amp;gt;Desmarcar todos&amp;lt;/a&amp;gt;&lt;br /&gt; &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;&lt;span style=&quot;font-style:italic;&quot;&gt;Javascript&lt;/span&gt;&lt;br /&gt;function activar(activado){&lt;br /&gt;&lt;br /&gt;var todos=document.getElementsByTagName(&quot;input&quot;);&lt;br /&gt;var a=new Array();&lt;br /&gt; &lt;br /&gt;for(x=0;x&amp;lt;todos.length;x++){ &lt;br /&gt;   if(document.getElementsByTagName(&quot;input&quot;)[i].type == &quot;checkbox&quot;) {&lt;br /&gt;      if(todos[x].type == &quot;checkbox&quot;){&lt;br /&gt; todos[x].checked=activado&lt;br /&gt;      }&lt;br /&gt;   }&lt;br /&gt;}&gt;&lt;/pre&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/5305558334685949052'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/5305558334685949052'/><link rel='alternate' type='text/html' href='http://apuntesenlaweb.blogspot.com/2010/05/activar-todos-los-checkbox-de-una.html' title='Activar todos los checkbox de una página'/><author><name>apuntes en la web</name><uri>http://www.blogger.com/profile/15160833806931593660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-257684801037723070.post-3531174974578307004</id><published>2010-05-17T19:04:00.005+02:00</published><updated>2010-05-18T00:35:40.953+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="php"/><title type='text'>Función para crear thumbnail en php</title><content type='html'>Función para crear thumbnail con las dimensiones deseadas en PHP&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;function subirImagenRecortada($imagen,$rutaImg,$nombre,$alturaMaxima,$anchuraMaxima){&lt;br /&gt;$varrand = $nombre;   //nombre aleatorio&lt;br /&gt;$varallw = array(&quot;image/jpeg&quot;,&quot;image/pjpeg&quot;);  //tipo de imagnes&lt;br /&gt;if (is_uploaded_file($imagen[&quot;tmp_name&quot;])) { &lt;br /&gt;     $varname = $imagen[&#39;name&#39;]; &lt;br /&gt;     $vartemp = $imagen[&#39;tmp_name&#39;]; &lt;br /&gt;     $vartype = $imagen[&#39;type&#39;]; &lt;br /&gt;     $ext = strrchr($imagen[&#39;name&#39;],&#39;.&#39;);  &lt;br /&gt;     //Comprueba que el archivos subir es JPG&lt;br /&gt;     if (in_array($vartype, $varallw) &amp;&amp; $varname != &quot;&quot;) { &lt;br /&gt;     $varname = &quot;p_&quot;.$varrand.$ext; &lt;br /&gt;     $varpath=$rutaImg;&lt;br /&gt;     if (copy($vartemp, $rutaImg.$varname)) { &lt;br /&gt; $filename = $varpath.$varname;&lt;br /&gt; list($width, $height) = getimagesize($filename);&lt;br /&gt;   &lt;br /&gt;    &lt;br /&gt; /* Recortar con lado de 90 px */&lt;br /&gt; $ancho=$anchuraMaxima;&lt;br /&gt; $alto=$alturaMaxima;&lt;br /&gt; list($width, $height) = getimagesize($filename);&lt;br /&gt; $diferencia_ancho = $width/$ancho;&lt;br /&gt; $diferencia_alto = $height/$alto;&lt;br /&gt;&lt;br /&gt; if($diferencia_ancho &lt; $diferencia_alto) {&lt;br /&gt;     $nuevo_ancho = $ancho;&lt;br /&gt;     $prop = $nuevo_ancho/$width;&lt;br /&gt;     $nuevo_alto = round($height*$prop);&lt;br /&gt;     $dist_x = 0;&lt;br /&gt;     $dist_y = ($alto-$nuevo_alto)/2;&lt;br /&gt; }else {&lt;br /&gt;     $nuevo_alto = $alto;&lt;br /&gt;     $prop = $nuevo_alto/$height;&lt;br /&gt;     $nuevo_ancho = round($width*$prop);&lt;br /&gt;     $dist_x = ($ancho-$nuevo_ancho)/2;&lt;br /&gt;     $dist_y = 0;&lt;br /&gt; }&lt;br /&gt;  $thumb = imagecreatetruecolor($ancho, $alto);&lt;br /&gt; imagealphablending($thumb, false);&lt;br /&gt; $source = imagecreatefromjpeg($filename);&lt;br /&gt; imagecopyresampled($thumb, $source, $dist_x, $dist_y, 0, 0, $nuevo_ancho, $nuevo_alto, $width, $height);&lt;br /&gt; imagejpeg($thumb, $varpath.$varname);&lt;br /&gt; imagedestroy($thumb);&lt;br /&gt;   &lt;br /&gt; return $varname;&lt;br /&gt;     } else { &lt;br /&gt;          echo  &quot;Error al subir el archivo&quot;; &lt;br /&gt;        } &lt;br /&gt;   }else { &lt;br /&gt;   echo  &quot;No se puede subir ese archivo&quot;; &lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;return $nameold;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/3531174974578307004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/3531174974578307004'/><link rel='alternate' type='text/html' href='http://apuntesenlaweb.blogspot.com/2010/05/funcion-para-crear-thumbnail-en-php.html' title='Función para crear thumbnail en php'/><author><name>apuntes en la web</name><uri>http://www.blogger.com/profile/15160833806931593660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-257684801037723070.post-5536691357981480490</id><published>2010-05-13T17:23:00.008+02:00</published><updated>2010-05-14T11:30:30.161+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="css"/><title type='text'>Cambiar hoja de estilos sin refrescar</title><content type='html'>Para poder cambiar la hoja de estilo lo primero es indica varias hojas de estilos alternitivas, para se una hoja de estilo alternativa debe tener un title y el atributo rel=&quot;stylesheet&quot;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;link  href=&quot;css/estilos.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;/&amp;gt;&lt;br /&gt;&amp;lt;link  href=&quot;css/blanco.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; title=&quot;hojaBlanco&quot;/&amp;gt; &lt;br /&gt;&amp;lt;link  href=&quot;css/negro.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; title=&quot;hojaNegro&quot;/&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;Después tenemos que llamar a la función activarCSS&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;a href=&quot;#&quot; onClick=&quot;activarCSS(&#39;hojaBlanco&#39;);return false&quot; id=&quot;btnBlanco&quot;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;En el javascript se debe incluir la función activarCSS&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;function activarCSS(title) {&lt;br /&gt;   var i, a, main;&lt;br /&gt;   for(i=0; (a = document.getElementsByTagName(&quot;link&quot;)[i]); i++) {&lt;br /&gt;       if(a.getAttribute(&quot;rel&quot;).indexOf(&quot;style&quot;) != -1 &amp;&amp; a.getAttribute(&quot;title&quot;)) {&lt;br /&gt;            a.disabled = true;&lt;br /&gt;     if(a.getAttribute(&quot;title&quot;) == title) a.disabled = false;&lt;br /&gt; }&lt;br /&gt;    }&lt;br /&gt;return false;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;  &lt;br /&gt;&lt;/code&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/5536691357981480490'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/5536691357981480490'/><link rel='alternate' type='text/html' href='http://apuntesenlaweb.blogspot.com/2010/05/cambiar-hoja-de-estilos-sin-refrescar.html' title='Cambiar hoja de estilos sin refrescar'/><author><name>apuntes en la web</name><uri>http://www.blogger.com/profile/15160833806931593660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-257684801037723070.post-6352235637071529395</id><published>2010-05-05T16:57:00.002+02:00</published><updated>2010-05-05T17:02:21.102+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mysql"/><category scheme="http://www.blogger.com/atom/ns#" term="php"/><title type='text'>Chuleta MySQL</title><content type='html'>Una &lt;a href=&quot;http://www.addedbytes.com/download/mysql-cheat-sheet-v1/png/&quot;&gt;chuleta MySQL&lt;/a&gt; con los tipos de datos de MySQL y las funciones más comunes en PHP</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/6352235637071529395'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/6352235637071529395'/><link rel='alternate' type='text/html' href='http://apuntesenlaweb.blogspot.com/2010/05/chuleta-mysql.html' title='Chuleta MySQL'/><author><name>apuntes en la web</name><uri>http://www.blogger.com/profile/15160833806931593660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-257684801037723070.post-3321916131653035080</id><published>2010-05-04T01:45:00.013+02:00</published><updated>2010-05-18T01:09:23.924+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="css"/><category scheme="http://www.blogger.com/atom/ns#" term="html"/><title type='text'>HR, linea con color</title><content type='html'>&lt;blockquote&gt;&lt;/blockquote&gt;El elemento HTML HR no se muestra en todos los navegadores igual para conseguir un resultado idéntico debemos obviar la height y utilizar el color en el borde como mostramos a continuación. Se ve perfectamente en todos los navegadores&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;hr style=&quot;border:none;border-top: 1px solid rgb(118, 169, 72); height: 0px; margin: 0pt auto; width: 90%;&quot;&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;hr style=&quot;border:none;border-top: 1px solid rgb(118, 169, 72); height: 0px; margin: 0pt auto; width: 90%;&quot;&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/3321916131653035080'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/3321916131653035080'/><link rel='alternate' type='text/html' href='http://apuntesenlaweb.blogspot.com/2010/05/hr.html' title='HR, linea con color'/><author><name>apuntes en la web</name><uri>http://www.blogger.com/profile/15160833806931593660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-257684801037723070.post-4287373385006776540</id><published>2010-05-04T01:01:00.004+02:00</published><updated>2010-05-04T01:36:28.131+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ajax"/><category scheme="http://www.blogger.com/atom/ns#" term="explorer"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="php"/><title type='text'>Problemas de cache con Internet Explorer</title><content type='html'>Un problema clásico de Intenet Explorer es que cuando realizamos una petición AJAX, aunque se modifique los datos en la base de datos, el navegador siempre nos muestra la misma página. Esto es debido a que Internet Explorer tiene una caché interna que no se carga como debiera.&lt;br /&gt;&lt;br /&gt;Vamos a mostrar dos posibles soluciones un en la lado de cliente y en otro en lado del servidor&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;header(&#39;Expires: Sun, 19 Nov 1978 05:00:00 GMT&#39;);&lt;br /&gt;header(&#39;Last-Modified: &#39;.gmdate(&#39;D, d M Y H:i:s&#39;).&#39; GMT&#39;);&lt;br /&gt;header(&#39;Cache-Control: no-store, no-cache, must-revalidate&#39;);&lt;br /&gt;header(&#39;Cache-Control: post-check=0, pre-check=0&#39;, false);&lt;br /&gt;header(&#39;Pragma: no-cache&#39;);&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt; &lt;br /&gt;Con estas lineas no aseguramos que no se guarde la cache y que en cada petición tenga que pedir los datos.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt; &lt;br /&gt;var num=Math.random();&lt;br /&gt;ajax=objetoAjax();&lt;br /&gt;ajax.open(&quot;GET&quot;, &quot;archivo.php?aleatorio=&quot;+aleatorio, true);&lt;br /&gt;ajax.onreadystatechange=function() {&lt;br /&gt;if (ajax.readyState==4)&lt;br /&gt;{ &lt;br /&gt;     document.getElementById(&quot;resultado&quot;).innerHTML=ajax.responseText;&lt;br /&gt;} &lt;br /&gt;}&lt;br /&gt;ajax.send(null);&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Otro posible solución es enviar una variable con un dato diferente cada vez ya sea con random o la hora actual</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/4287373385006776540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257684801037723070/posts/default/4287373385006776540'/><link rel='alternate' type='text/html' href='http://apuntesenlaweb.blogspot.com/2010/05/problemas-de-cache-con-internet.html' title='Problemas de cache con Internet Explorer'/><author><name>apuntes en la web</name><uri>http://www.blogger.com/profile/15160833806931593660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry></feed>