Hello,

im going crazy by simply selecting a DIV Element with class.

I want to add to each <div class=main"></div> a aditional Element.
I tried two versions:

<script type="text/javascript">
    function adCorner() {
      $$(".main").each(function(item) {
                        item.insert({top: '<p>My Element</p>'})
      });
    }
</script>

and this

<script type="text/javascript">
      $$(".main").each().insert({top: '<p>My Element</p>'});
</script>

But nothing happend.

Its so easy with ID's but its not working with classes.

Thanks for help.

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

Reply via email to