AJS – Javascript Library

AJS – Javascript Library

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
81 views

AJS is a ultra lightweight JavaScript library that is around 2 years old. It is inspired by MochiKit, but differs by being small and expressive. The current version is only 33 KB (uncompressed!), whereas MochiKit and other libraries such as JQuery, Mootools or Prototype is over/around 100 KB.

AJS includes:

* Powerful and easy to use AJAX functions
* Performance on almost everything
* Effects
* Drag and drop
* Functional programming such as AJS.map, AJS.partial
* DOM functions such as AJS.$
* AJAX JSON support (with AJS.loadJSON and AJS.serializeJSON)
* Unified position and size that works in all the modern browsers
* Unified events that work in all the modern browsers
* and a lot more…

But that’s not all! AJS also features:

* Only ONE namespace is used, namely AJS
* Documentation and examples on all functions
* Polymorphic – A Python script can scan your code, find the AJS functions you use and create a special AJS file for you that is MUCH smaller!

Code snippets
Creating DOM smartly

var p_elm = P(SPAN({class: 'blue_n_black'}, IMG({src: 'hottie.gif'})));

Expressive

//Delete all span elements with class “name” and fluffy_id element
removeElement($bytc(’span’, ‘name’), $(’fluffy_id’));

AJAX done easily

function doSearch() {
    var url = "http://api.search.yahoo.com/";
    var d = AJS.loadJSON(url);

    d.addCallback(function(o) { alert(o); });
    d.addErrback(function(err) { alert(err); });

    var form = AJS.$('formy');
    d.sendReq({appid: "YahooDemo",
                        query: AJS.$f(form, 'q').value,
                        results: AJS.$f(form, 'r').value,
                        output: "json"})
    return false;
}

Effects

AJS.fx.setHeight(AJS.$('div'), {from: 0, to: 500});

Documentation

* AJS reference – Use this to get an overview over functions that AJS provides
* AJS.fx reference – Use this to get an overview over effects
* AJS.dnd reference – Use this to get an overview over drag and drop

Examples

* Simple drag and drop
* AJS.fx show-off
* JavaScript OOP
* Sortable list
Demo: http://lab.digimute.com/
Download: http://orangoo.com/labs/uploads/AJSv4_5.zip
Source: http://orangoo.com/labs/AJS/

http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/stumbleupon_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/delicious_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/blinklist_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/furl_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/technorati_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/magnolia_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/google_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/myspace_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/facebook_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/sphinn_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/mixx_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/twitter_32.png

Related Listings:

  1. Ext Core – Cross-Browser Javascript Library Ext Core is a lightweight and feature rich core JavaScript...
  2. Ext Core: Cross-Browser Javascript Library Ext Core is a lightweight and feature rich core JavaScript...
  3. Dajax – Ajax library for django Dajax is an easy to use ajax library for django...
  4. DHTML API, Drag & Drop for Images and Layers – Ajax – Javascript A Cross-browser JavaScript DHTML Library which adds Drag Drop functionality...
  5. Collapsible-Drag-Drop Javascript Panels This script will give you a good idea of what...

Do you like this post?

Email:     

Tags: , , , , , , , , , , , , , , , , , , , ,

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment



Web Design & CSS (Templates) - TOP.ORG