Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
css
 
 
 
 
 
 
 
 
 
 
 
 
 
 

JaSper v3.5 José M. Carnero

===

Librería multi propósito JavaScript.

  • Selector DOM XPath y CSS.
  • Extremadamente ligero.
  • Fácil de extender y modularizar.
  • Carga dinámica (en demanda) de componentes (normal y minificado).
  • Gestión de nodos.
  • Gestión de eventos. Permite añadir varios (separados por comas) al mismo elemento DOM y mismo callback. Permite eliminar todos los eventos de un elemento DOM (incluyendo aquellos con callback anónimo), sólo los asociados a un determinado evento, etc.
  • Traducción automática de textos.
  • 'use strict'
  • Agregador de eventos (DOM y/o personalizados).

###Módulos incluidos:

###Ejemplo:

$(document).debug().ready(function(){
	$('<body>').eventAdd('click', function(ev){
		$('//p').toggle(500); //XPATH no funciona en IE
	}).eventAdd('mousewheel', function(ev){
		if(JaSper.funcs.windowPosition().indexOf('bottom') > -1 && ev.wheelDelta == -3) alert('fin de página');
	}).eventAdd('custom_event', function(ev){
		alert('evento personalizado');
	}).eventFire('custom_event');
});

Testeo en Firefox.

También funciona en Chrome e IE.

==== In English:

JavaScript library.

  • DOM XPath selector and CSS selector.
  • Extremely lightweight.
  • Easy to extend and modularize.
  • Dynamic loading (on demand) of components (normal and minified).
  • Node management.
  • Event management. You can add multiple events (comma separated) to one DOM element and one unique callback. Can delete all events associated to a DOM element (included anonymous callbacks), or only those associated with a specific event, ...
  • Text translation.
  • 'use strict'
  • Event aggregator (DOM and/or custom).

###Modules included:

  • AJAX with start callback, end callback and fail callback.
  • Beautifier in a very early stage yet.
  • Canvas (draft version).
  • CSS animations.
  • Dates with countdown and date picker.
  • Forms validation with upload image preview and callbacks for validation start (inicio), validation end (fin) and validation fail (fallo).
  • Image carousel with callbacks for image foot, description and origin.
  • Object movement with movement start callback, end movement callback and in move callback; under mouse object information; touch devices.
  • Rating with stars, bars in development.
  • REST client, by now only GET and POST.
  • Rich text box.

###Example:

$(document).debug().ready(function(){
	$('<body>').eventAdd('click', function(ev){
		$('//p').toggle(500); //XPATH don't work in IE
	}).eventAdd('mousewheel', function(ev){
		if(JaSper.funcs.windowPosition().indexOf('bottom') > -1 && ev.wheelDelta == -3) alert('end of page');
	}).eventAdd('custom_event', function(ev){
		alert('custom event');
	}).eventFire('custom_event');
});

Tested on Firefox.

Also works on Chrome and IE.

About

JaSper is a JavaScript library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages