Ver Mensaje Individual
  #2 (permalink)  
Antiguo 19/01/2010, 04:52
Dany_s
 
Fecha de Ingreso: diciembre-2009
Ubicación: Misiones
Mensajes: 867
Antigüedad: 14 años, 5 meses
Puntos: 65
Respuesta: entrando al mundo de los plugins

Código HTML:
<!DOCTYPE html>
<html>
<head>
  <script src="jquery-1.4.js"></script>
  <script src="jquery.valAlerter.js"></script>
  <script>
    $( function (){
        $('#nombre, input[name=sexo], #pais').valAlerter();
    });
  </script>
</head>
<body>
<input id="nombre" type="text" name="nada" value="" /><br />
Sexo: <input type="radio" name="sexo" value="masculino" /> M <input type="radio" name="sexo" value="femenino" /> F <br />
Pais: <select id="pais" name="pais">
    <option>Seleccionar</option>
    <option>Argentina</option>
    <option>Paraguay</option>
    <option>Uruguay</option>
</select>
</body>
</html> 
archivo jquery.valAlerter.js

Código HTML:
( function($) {
    $.fn.valAlerter = function(){
        return this.each( function() {
            $(this).change( function () {
                alert( $(this).val() );
            });
        });
    }
})(jQuery);