资 源 简 介
Scatter.js - a lightweight ajax library for element scattering
Copyright (c) 2010
Q42
Written by Martin Kool
Scatter sends a form (or retrieves a URL) through ajax. If the response contains
elements (at top level) with ids that correspond with ids on the current page,
the current element will be replaced. This is called "scattering" of elements.
Scatter is a 100% RESTful ajax library with only a 2k footprint, when compressed. It supports forms with multiple submit buttons, several ways of initialization and
a clean API. The source code provides Visual Studio intellisense when used in VS.
Scatter works standalone but is fully compliant with jQuery, Mootools, Prototype or any other js library.
Usage:
1. You can specify a rel="scatter" attribute on a form or hyperlink. You only need to
> run Scatter.scanPage() once, when the page is loaded. This can be done through
>
, or any other way you prefer.
2. Another usage is through event handler