jLim – compact JavaScript framework

jlim es un mini marco de JavaScript (paquete de ~ 13kb minified) y contiene las características más utilizadas de jQuery. Ideal para los sitios de menor complejidad. jlim es de cero, pero tiene una interfaz que es aproximadamente igual a jQuery.
jlim contiene los siguientes módulos:
- Núcleo (~ 2,5 kb)
- DOM (~ 2.3kb)
- CSS (~ 1,3 kb)
- Evento (~ 2.3kb)
- Ajax (~ 0,5 kb)
Y contiene el (EXTERNO) componentes, incluido en el paquete:
- Domready (~ 0.7kb)
- SimpleSelector (~ 2,5 kb)
- SimpleAjax (~ 1,3 kb)
¿Cómo funciona??
$('A').attr('Title', "Abrir enlace");
$('# Btn').removeClass("Activo");
var tamaño = $('li').tamaño();
var el ='Si'39;).obtener(1);
Ejemplo de encadenamiento
$('# Wrapper')
.find('P')
.html("Lorem ipsum ...")
.eq(2)
.CSS("Background-color ', "# FF0000")
.end()
.end()
.find("Bencontrarn")
.clic(función(){
$(esta).addClass('Highlight');
})
.end();
de
Documentación de la API
Descargar
Puede descargar la última versión del Github.
Soporte del navegador
Probado en IE6 , FF, Opera, Chrome y Safari (para Windows).
Licencia
Código cae bajo el Licencia del MIT.
Artículos relacionados























do you plan an event modul ?
Here you go….jLim Event Plugin
This is an amazing mini js framework.
Just starting to sink my teeth into it. No going back to jQuery now.
Thanks for creating jLim
Alex
Again: this is just really really nicely done – only bit I miss slightly when working with complex code is jQuery’s deferred object – but this is tiny issue compared to the overall brilliance of having access to most of the basic features from jQuery is such a small library.. Thanks!
So when are you going to put this project up on github so we can all start forking and keeping up with updates?
This is a great beginning for those simple sites that don’t need 30kB+ of extra Javascript code to parse on each page.
Good point David. I try to put it on Github this week.
And Janus, that way anyone can add an extention, like a deferred object
@Alex: Thanks!
Is there any way to return a node/element index like jQuery’s index() function?
Alex
@Alex You could use this code:
(jLim.core || jLim.fn).extend({index: function (element) {
var el = jLim(element).get(0);
for (var x = 0, y = this.length; x < y; x++) {
if (this.els[x] === el)
return x;
}
return null;
}
});
Examples:
$('button').index(document.getElementById('btn-test1'));$('button').index('#btn-test1');
$('button').index($('#btn-test1'));
It doesn't work exactly like jQuery's index, but this should do the job.
Awesome! cheers Victor.
Keep up the good work on jLim