:: Live Query :: El nuevo plugin de Jquery

He andado algo ocupado , mas bien bastante ocupado, llevo 3 dias intentando instalar Compiz-fusion en GNU/Linux Debian Etch , y nada mas no funciona, al parecer solo hay manuales para ubuntu, y ademas o los repositorios no estan bien o me dan problemas los paquetes, pero haber cuando lo logro(“espero ya terminarlo hoy”).

Además fui a ayudar a checar conexiones de internet y todo eso, en una expo(“No no es de tecnologia es de restaurantes!!!”).

Pero he andado leyendo uno que otro post en diferentes blogs, y en Ajaxian me encontre con un nuevo plugin para Jquery, se llama Live Query.

JQuery

Les platico rapidamente de que se trata (“Como una traduccion!!”).

“Live Query es un plugin para Jquery, que utiliza el poder de los selectores de Jquery, para agregar elementos al Dom”

En ingles :

Live Query (formerly Behavior) utilizes the power of jQuery selectors by binding events or firing callbacks for matched elements auto-magically, even after the page has been loaded and the DOM updated.

Ejemplos de Live Query

Live Query can even be used with the more powerful jQuery selectors. The following Live Query will match and bind a click event to all A tags that have a rel attribute with the word “friend” in it. If one of the A tags is modified by removing the word “friend” from the rel attribute, the click event will be unbound since it is no longer matched by the Live Query.

$(‘a[@rel*=friend]‘)
.livequery(‘click’, function(event) {
doSomething();
});

Live Query also has the ability to fire a callback function when it matches a new element and another callback function for when an element is no longer matched. This provides ultimate flexibility and untold use-cases. For example the following code uses a function based Live Query to implement the jQuery hover helper method and remove it when the element is no longer matched.

$(‘li’)
.livequery(function(){
$(this)
.hover(function() {
$(this).addClass(‘hover’);
}, function() {
$(this).removeClass(‘hover’);
});
}, function() {
$(this)
.unbind(‘mouseover’)
.unbind(‘mouseout’);
});

Espero que les sirva de utilidad y disculpen lo que pasa es que no he tenido tiempo de traducirlo ups!! pero de que es valioso, lo es…

via: Ajaxian
Enlace: jQuery Live
Live Query: Live Query
Documentacion : Live Query
Descargar Version 0.0.3: Live Query
Descargar Version 1.0.0: Live Query
Libreria Jquery: Jquery

Related Photos

No related photos.

One Response

07.07.2010

Gracias…, espero que termines el articulo, suerte

Comentar

* Nombre, Email y Comentario son campos obligatorios

Recibe nuestro contenido por email

Vas a recibir un email con los artículos escritos durante el día.

Categorias

Historico de entradas publicadas