On Thu, Feb 24, 2011 at 21:18, mwallender <[email protected]> wrote:
> <a href="#" onclick="effect_1 = Effect.SlideDown('d1',{duration:1.0});
> return false;"><img src="logo.gif" width="100" height="55" /></a>
I think you need to write it like this:
<a href="#" onclick="function() { effect_1 =
Effect.SlideDown('d1',{duration:1.0});
return false;}"><img src="logo.gif" width="100" height="55" /></a>
But you really should not use onclick atributes in the HTML code.
Instead use somehing like this in JS:
var links = $$('a.whatever');
links.each( function(a) {
a.observe('click', function() {
effect_1 = Effect.SlideDown('d1',{duration:1.0});
return false;
};
});
But that's just a very hasty sketch. Read up on "observe".
--
Bertilo Wennergren
[email protected] http://bertilow.com
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.