>All Tutorials 
Ajax and .NET Ajax and .NET RSS XML
Ajax and ColdFusion Ajax and ColdFusion RSS XML
Ajax and Java Ajax and Java RSS XML
Ajax and PHP Ajax and PHP RSS XML
Ajax and SOA Ajax and SOA RSS XML
Ajax Goodies Ajax Goodies RSS XML
Ajax Tool Ajax Tool RSS XML
Facebook MockAjax Facebook MockAjax RSS XML
Google Web Toolkit Google Web Toolkit RSS XML
JavaScript Framework JavaScript Framework RSS XML
Ruby on Rails Ruby on Rails RSS XML
Technique Introduction Technique Introduction RSS XML
Without XMLHttpRequest Without XMLHttpRequest RSS XML
Yahoo! UI Yahoo! UI RSS XML

Extending DOM elements Prototypes - element prototype function classname extend method form custom

 
Registered tutorials: 501
Registered Users: 33128



Rating: 4 out of 1 votes cast


  
Category: Ajax and .NET

Extending DOM elements Prototypes

Digg this   Post to del.icio.us

Abstract: In this example-oriented tutorial, Juriy Zaytsev discusses how to use Element.addMethods method of Prototype to extend DOM elements with custom methods

rnrn

One of the beauties of prototype is in the way it allows us to extend its functionality. Building custom snippets of code has never been easier. The philosophy behind it is to keep core-level things at a minimum, but provide a convenient way to extend them.
rnThe magic method is Element.addMethods

rn

The syntax is quite simple:

rnrn
Element.addMethods({rn  method1: function() { ... },rn  method2: function() { ... },rn  ...rnrn})

Read Full Tutorial...



Reviews:

Rate and Review This Site

No reviews yet


Statistic Information About this Resource:


Total Hits: 59
Unique Hits: 54


  Daily Weekly Monthly
  Unique Total Unique Total Unique Total
Average 0 0 0.1 0.1 0.5 0.6
Current 0 0 0 0 0 0
Previous 0 0 0 0 1 1
Nov 29 0 0 0 0 0 0
Nov 28 0 0 0 0 1 1
Nov 27 0 0 0 0 1 1
Nov 26 0 0 0 0 1 1
Nov 25 0 0 1 1 1 2
Nov 24 0 0 0 0 0 0
Nov 23 0 0 0 0 0 0
Nov 22 0 0 0 0 0 0
Highest 5 6 20 21 44 47


Script Execution Time: 0.33727 | SQL Queries: 10 | Members: 501
Ajax Tutorial Top List - Powered by Aardvark Topsites PHP 5.1.2