Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #7888 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

Element.addMethods does not add to the Element namespace

Reported by: markygab Assigned to: sam
Priority: low Milestone: 1.x
Component: Prototype Version: edge
Severity: minor Keywords: discuss
Cc:

Description

Methods added can be accessed through $() but not Element

Element.addMethods({
	newFunction: function(element) {
		alert('new function');
	}
});
Element.newFunction('someID'); // bad
$('someID').newFunction(); // good

Change History

03/22/07 17:29:09 changed by mislav

  • keywords set to discuss.
  • severity changed from normal to minor.
  • summary changed from Element.addMethods does not add the methods to the Element object. to Element.addMethods does not add to the Element namespace.

04/24/07 08:21:58 changed by Tobie

  • status changed from new to closed.
  • resolution set to fixed.

fixed in [6561].