[Proto-Scripty] Re: clonePosition - problem in IE and Opera

2009-03-31 Thread zero

ok, no respond so i solved it myself

Event.observe(window, 'load', function() {
var klon;
$$('li').each(function(el){
Event.observe(el, 'mouseover', function(event) {
klon = $('klon');
var r;
if(Prototype.Browser.IE){
r = (el.positionedOffset())[1];
}else if(Prototype.Browser.Opera){
r = 
(el.viewportOffset())[1]-(el.cumulativeScrollOffset())[1];
}else{
r = (el.viewportOffset())[1];
}
klon.setStyle({ top: r + 'px' });
klon.show();
});
});

Event.observe('klon', 'mouseout', function(event) {
klon.hide();
});

});


On 23 Mar, 13:17, zero zero.zero1...@gmail.com wrote:
 anyone got some idea?
 Its bug or i do something wrong?
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: clonePosition - problem in IE and Opera

2009-03-05 Thread zero

is it a prototype bug? Does it have some bug ticket?

On 2 Mar, 12:50, zero zero.zero1...@gmail.com wrote:
 This code works in firefox 2, firefox3 and chrome but in  in opera,
 ie6, ie7 olive div appear in wrong place when u scroll list. In ie it
 goes up and in opera down. Why, any solution?.

 style
         ul{margin: 200px 0px;padding: 0px;list-style: none;background-color:
 blue;overflow: auto;width:120px;height: 150px;}
         li{width:100px;height: 100px;background-color: green;}
         #klon{position:absolute;width:100px;height: 100px;z-index:
 10;background-color: olive; }
 /style

 ul
         lia/li
         lib/li
         lin/li
         lim/li
         lit/li
         liu/li
         lio/li
 /ul

 div id=klon style=display:none 
 /div

 script type=text/javascript src=http://ajax.googleapis.com/ajax/
 libs/prototype/1.6.0.3/prototype.js /script
 script type=text/javascript src=http://ajax.googleapis.com/ajax/
 libs/scriptaculous/1.8.1/scriptaculous.js /script

 script type=text/javascript
         Event.observe(window, 'load', function() {
                 var klon;
                 $$('li').each(function(el){
                         Event.observe(el, 'mouseover', function(event) {
                                 klon = $('klon');
                                 klon.clonePosition(el);
                                 klon.show();
                                 klon.clonePosition(el);
                         });
                 });

                 Event.observe('klon', 'mouseout', function(event) {
                         klon.hide();
                 });

         });
 /script
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---