Ajax Content for MooTools v1.2 (Facebook Style)

0

Posted by Rob | Posted in Code, Javascript, MooTools | Posted on 22-10-2009

Tags: , , , , ,

Welcome to my second attempt at writing up a mootools class. This one’s a little more advanced this time.

It attaches an Ajax handler to all links on a page which conform to the selector you give it. For example, you can tell it to attach to all standard links (<A HREF=’/here/’>Hello</A>), or links with a specific class as i’ve done with the code below (<A HREF=’/here/’ CLASS=’ajax’>Hello</A>).

I hope someone finds this useful. As ever this was created after I kept saying that I could write something a hell of a lot better than anything else I was finding. This might be a bold statement, but I was having trouble finding anything that would do the job, and simply.

Read the rest of this entry »