as stated on http://mir.aculo.us/2006/4/27/like-reflections-try-the- reflector -- it's more of a plaything than meant for production use... :)
best, thomas Am 10.01.2007 um 17:09 schrieb Jason Hummel: > > While not directly related to prototype/s.a.u. I thought this would be > the best place to pose this question. I apologize, if it's off topic. > > I'm working on an interface where I have a bunch of list items floated > to the left in a horizontal fashion. The list is inside a absolutely > positioned div, with an overflow set to hidden. > > At one point in my script I have to remove the first list item, but I > don't want the rest of the list items to collapse to the left. Within > my script I have something like: > > this.ul.removeChild(li[0]); > this.ul.style.left = '100px'; > > Now assuming the list is positioned relative and each list item is set > to 100px wide. This should remove the first li, collapsing the others > to the left, then I immediately set the left side of the ul to 100px, > so it looks like the first li disappears. > > The script works on Firefox and Opera if the li's contain a simple DOM > snippet - an image or a piece of text. But it seems to slow down on > Firefox if the DOM is more complex. I have an image inside each li and > I use Thomas's reflector script at > http://mir.aculo.us/stuff/reflector/reflector.html to put a reflection > on each image. The script adds about 10 divs to each li. Once the > extra divs are in place, when the element is removed there's a > noticeable 'jump' between the first element being removed and the list > being positioned back in place. > > I've tried different variations on the above script such as using > prototype's Element.remove() and Element.setStyle() to no avail. > > Interestingly, using firebug's console.time() functions, I can see > that the line to set the style is taking 0ms to complete, but the > redraw is obviously slower. > > Anyone know of any tricks to getting firefox's positioning a little > faster? > Sorry, for the long email, > Jason > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" 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/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
