Im just getting into script.aculo.us by way of cakephp. As for
javascript frameworks Ive only used jquery.

This question is so basic I cant find anything on past posts here in
the groups hence this post.

Basically I just took a random effect and it worked as described in
the github area by applying it to an element selected by id.

Im trying to get the effect to work "not by id" but by "this". Heres
my example but not working:

script:
<code>
<script type="text/javascript" language="javascript">
  // <![CDATA[
        function myeffect() {
        $(this).fade({ duration: 3.0, from: 0, to: 1 });
        }
  // ]]>
</script>
</code>

html
<code>
<div onclick="myeffect()">
  Click me to fade away
</div>
<div onclick="myeffect()">
  or click me to fade away
</div>
</code>

I dont see any documentation on how to apply to "document.this"

Im sure my syntax is wrong but everyway I switch it around it still
wont work.

What am I doing wrong?

Thanks in advance!

jc

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to