What is Prototype ?
Scriptaculous and other libraries, such as Rico build on Prototype's foundations to create widgets and other end-user stuff.
- Extends DOM elements and built-in types with useful methods.
- Has built-in support for class-style OOP including inheritance.
- Has advanced support for event management
- Has powerful Ajax features
- is not a complete application development framework.
- does not provide widgets or a full set of standard algorithms or I/O systems.
How to install Prototype?
Prototype is distributed as a single file called prototype.js. This is very simple to do require setup to use prototype library. You have to carry three simple steps:
Go to the download page to grab the latest version in a convenient package.
That's it. You are ready to use powerful Prototype framework in your web pages.
How to use Prototype Library?
Now you can include Prototype script as as follows:
node = $("firstDiv");
<p>This is first paragraph</p>
<p>This is another paragraph</p>
<input type="button" value="Test $()" onclick="test();"/>
To understand it in better way you can Try it yourself.
Why is this tutorial?
A very good documentation for Prototype Framework is available at prototypejs.org then why I'm creating this tutorial ?
The answer is that I have put all the most commonly used functionality together in this tutorial. Second, I have explained all the useful methods along with suitable examples which are not available at the official site.
If you are an advanced user of Prototype Framework then you can directly jump to official website otherwise this tutorial could be a good start for you and you can use it like a reference manual.