Archive for the ‘javascript’ Category
-
Titulos al estilo Alejandro con jQuery
Este mini-plugin va en honor a Alejandro Adriasola amo y señor de las páginas web y el diseño. Lo que hace es bien sencillo, toma un texto y lo junta envolviendolo con spans alternando las clases para obtener un lindo resultado si se usa con un css adecuado. /* Copyright (c) 2009 José Joaquín Núñez [...]
-
Formatear números con punto como separador de miles con javascript
Number.prototype.format = function(){ var number = new String(this); var result = ''; while( number.length > 3 ) { result = '.' + number.substr(number.length - 3) + result; number = number.substring(0, number.length - 3); } result = number + result; return result; }; -
Validar formato de patentes de autos en Chile con expresiones regulares
El validador de symfony y de jquery validate esta disponible dentro de este post.
$patente = ‘AB-12-34′;
$regex = ‘/^[a-z]{2}[\.\- ]?[0-9]{2}[\.\- ]?[0-9]{2}|[b-d,f-h,j-l,p,r-t,v-z]{2}[\-\. ]?[b-d,f-h,j-l,p,r-t,v-z]{2}[\.\- ]?[0-9]{2}$/i’;
if (preg_match($regex, $patente))
echo "Patente correcta";
else
echo "Patente incorrecta";Saludos
-
jquery clock plugin
jquery clock plugin is just another clock plugin, it comes with an analog and digital options and another option to handle timezones, warning! the analog clock only works with css3 for the analog clock (and almost all the plugin) i’m using the code and images from this article of css-tricks.com you can see this plugin [...]
-
Disabling a input without using disabled=”disabled” with jquery
$(’.you_cant_change_this_input_unless_you_have_linux_and_you_use_the_middle_mouse_button_or_you_use_a_javascript_console_a_bookmarklet_or_something_like_that’).keydown(function(){ return false; }).mousedown(function(){ return false; });
-
jquery enable disable plugin
This plugin can disable or enable easily an input, textarea or another form element by using a radio button, checkbox or a drop-down list,… ok i know, it doesn’t sound like something amazing … is just a simple and flexible plugin for complex forms. Homepage Download Demos Documentation jquery plugin page greetings (04-07-2010) update: drop-down [...]
-
form populator es aún más rápido
Bueno el titulo dice en gran parte que es lo nuevo de esta herramienta, para los que no la conocen, form populator es un generador de bookmarklets para completar tus formularios con datos reales completamente configurable. El motivo de este post es contarles que he agregado un bookmarklet que recoge la información del formulario que [...]
-
jquery css cleaner
this helper it’ll help you with the recognition of unused css selectors and properties/values, so you could delete this lines of your css file in order to make it lighter. if you are this kind of person worried about the loading time, optimizing everything, you would find this script very useful and you’ll love it. [...]
-
jquery seo mini helper
in SEO there are important tips like: an image must have a title and an alt text or a link must have title. check all these thing is pretty bored…. so i wrote a jquery-based script that check for images or links without those things. the result es very basic, don’t expect nothing very impressive [...]
-
capitalizando texto con jquery
Conociendo lo desordenado que son la mayoría de los usuarios de internet cuando por ejemplo, llenan un formulario, he creado un pequeñisimo “plugincito” de jquery para que el texto ingresado por un usuario en un <input /> se capitalize. Le puse jquery capitalize para mantener mi originalidad … acá los demos, documentación ( bien corta [...]

