Alternative lightweight modular javascript library

Posted by Dan Eastwell Tue, 30 Jan 2007 16:59:00 GMT

JQuery is great, but I find I only use it to access DOM elements and manipulate them. A large part of the 19KB is unused, unless using fades and show/hides, etc. I've just come across this smaller, modular library DOMAss via 456Berea St.

I think it might be useful for doing the heavyweight DOM manipulation tasks that have taken a massive amount of code previously.

The active part of the code is this:


var str = new String(
this.value);
var remaining = maxKeys - str.length;
if(remaining <= 0){
	//alert('none left');
      this.value = this.value.substring(0,maxKeys);	
}
var endstr = remaining + textareaMaxCharsMsg;

if (remaining < 0){ endstr = textareaLimitMsg +
 maxKeys + textareaLimitEnd;}

The rest is just DOM manipulation needed to stop inline event handlers.

DOMAss seems to allow you to only include the functions you're using. Having said that, I wonder how you'd add visual effects without including all of JQuery..?

Posted in ,  | no comments | no trackbacks

Comments

Trackbacks

Use the following link to trackback from your own site:
http://www.thoughtballoon.co.uk/blog/trackbacks?article_id=alternative-lightweight-modular-javascript-library&day=30&month=01&year=2007

(leave url/email »)

   Comment Markup Help Preview comment