[Proto-Scripty] Invoking callback in plugin

2010-05-11 Thread Phonethics
Im trying to create a plugin where one of the options is a callback parameter new myPlugin.('div1',{callback:function(){ ... }}); But how do I invoke the callback in the plugin ? this.options.callback(); ? Thanks -- You received this message because you are subscribed to the Google Groups

[Proto-Scripty] Index of Element Relative to Parent

2010-05-11 Thread Phonethics
Is there a way to know the index of the element relative to the parent as in jQuery ? document.observe(dom:loaded, function() { $$('#block1 a').invoke('observe','click',function(e) { alert($(this).index()); // If Click 3 is clicked, it should alert 3 }); }); div id=block1 a

[Proto-Scripty] Binding functions to $$ directly

2010-05-10 Thread Phonethics
How come I got to this $$('#div1 p span.someclassName').each(function(el) { Event.observe(el, 'click', function(event) { alert('a'); }); }); instead of something like this ? $$('#div1 p span.someclassName').observe('click', function(el) { alert('b'); }); Any way to get

[Proto-Scripty] Hide specific tags in an element

2010-05-07 Thread Phonethics
Im using Prototype instead of jQuery for a particular site, but I cant seem to do a simple thing like this : $('#frm-contact label').hide(); would've worked in jQuery - how do I get this working in PrototypeJS ? Tried $$('#frm-contact label').hide(); but it doesnt hide. -- You received this

[Proto-Scripty] Re: Hide specific tags in an element

2010-05-07 Thread Phonethics
/ comwww.crowdersoftware.com On May 7, 8:46 am, Phonethics phoneth...@gmail.com wrote: Im using Prototype instead of jQuery for a particular site, but I cant seem to do a simple thing like this : $('#frm-contact label').hide(); would've worked in jQuery - how do I get this working