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
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
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
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
/ 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