Академический Документы
Профессиональный Документы
Культура Документы
NET: UNA
NUEVA EXPERIENCIA DE
USUARIO
Manejar eventos
Animaciones
Peticiones Ajax
JQUERY Y ASP.NET: UNA
NUEVA EXPERIENCIA DE
USUARIO
Sistema de plugins
Lenguaje cliente
No es invasivo
Liviano
Sencillo de utilizar
JQUERY Y ASP.NET: UNA
NUEVA EXPERIENCIA DE
USUARIO
Cmo incluir cdigo JavaScript:
<script type="text/javascript">
alert('Mensaje usando JavaScript');
</script>
jQuery == $
$(function(){
//cdigo
})
JQUERY Y ASP.NET: UNA
NUEVA EXPERIENCIA DE
USUARIO
Selectores: permiten determinar con cual o cuales elementos se va a
Selector Descripcin
$(*) Todos los elementos
$(etiqueta) Los elementos del un tipo (ej: p)
$(#id) Elemento con determinado id (HTML)
$(#<%= id.ClientID %>) Elemento con determinado id (Servidor)
$(.clase) Selecciona por nombre de clase (css)
$(selector selector) Descendencia
$(selector1, selector2,.) Mltiples selectores
JQUERY Y ASP.NET: UNA
NUEVA EXPERIENCIA DE
USUARIO
Filtros: permiten realizar filtros sobre los selectores
Filtro Descripcin
:first Primer elemento
:last ltimo elemento
eq(#) Posicin
:even Pares
:odd Impares
[atributo] Tiene un determinado atributo
[atributo=valor] Tiene un determinado atributo con un
determinado valor
JQUERY Y ASP.NET: UNA
NUEVA EXPERIENCIA DE
USUARIO
Atributos: Caractersticas de los elementos HTML.
$(selector).attr(clave,valor);
Remover atributo:
$(selector).removeAttr(clave);
JQUERY Y ASP.NET: UNA
NUEVA EXPERIENCIA DE
USUARIO
Clases: Conjunto de estilos
Agregar clase:
$(selector).addClass(nombreclase);
Remover clase:
$(selector).removeClass(nombreClase);
$(selector).removeClass();
JQUERY Y ASP.NET: UNA
NUEVA EXPERIENCIA DE
USUARIO
Estilos css
Agregar estilo:
$(selector).css(propiedad,valor);
Mtodo corto:
$(selector).evento(function(){
//Cdigo
})
Mltiples eventos:
$(selector).bind({
evento1: function(){.},
evento2: funciton(){.}
})
JQUERY Y ASP.NET: UNA
NUEVA EXPERIENCIA DE
USUARIO
Animaciones: Efectos/mtodos sobre los elementos.
Ocultando/Mostrando elementos:
hide() show() toggle()
JQUERY Y ASP.NET: UNA
NUEVA EXPERIENCIA DE
USUARIO
Llamados Ajax:
estar disponible.
JQUERY Y ASP.NET: UNA
NUEVA EXPERIENCIA DE
USUARIO
Pgina oficial: http://jquery.com/
GRACIAS!