argh.  sorry, I think I figured this out right after I posted...  I
solved this by doing

        document.observe("dom:loaded", function() {
                $$('.a').invoke('observe', 'mouseover', function
(event) {
                        console.log(this.id)
                        Event.stop(event);
        })});

..

-patrick


On Nov 15, 7:14 pm, patrick <patrick99...@gmail.com> wrote:
> So, what I want is to be able to hover the mouse on overlapping divs,
> and have be able to affect only the div that i am directly under (the
> div highest up).
>
> As of now, when I hover over the 3rd box, I get "first", "second",
> "third" in the console..  I just want to get "third"..
>
> is this possible?
>
> -patrick
>
> <script type="text/javascript">
>         document.observe("dom:loaded", function() {
>                 $$('.a').invoke('observe', 'mouseover', function() {
>                         console.log(this.id)
>         })});
>
> </script>
>         <style type="text/css">
>                 .a {
>                         background: #5500ff;
>                         height: 250px;
>                         width: 250px;
>                         margin: 50px 0;
>                         border-top: 1px solid black;
>                 }
>         </style>
> </head>
> <body>
>         <div class="a" id="first">some text
>                 <div class="a" id="second">some more text
>                         <div class="a" id="third">and some more text</div>
>                 </div>
>         </div>
> </body>
--~--~---------~--~----~------------~-------~--~----~
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 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to