I want to rewrite getOffsetParent of element object.
I created a js file which is loaded after prototype file, and within
it , I have following code
//////////////////
Object.extend(Element, {getOffsetParent : function(element) {
        alert('get new offset');}});
/////////////////
which doesn't work,
I also tried
/////////////////////////
Element.getOffsetParent = function(element) {
        alert('get new offset');}
/////////////////////
doesn't work either
if i use Element.getOffsetParent, it's calling the new function, but
if I call it like this
//////////////////
var myelement = $('test');
myelement.getOffsetParent
////////////////
it still call the native prototype function

thanks in advance
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to