Hi On 27 Mai, 00:42, JacobSingh <[EMAIL PROTECTED]> wrote: > I'm trying to use jcarousel to cycle through flash objects. I've got > the whole thing working well rotating out my HTML, but the problem is > flash's z-index issue. To solve this, I figured I'd use the > ItemVisible handlers to hide the HTML when it left the stage: > > function itemVisibleInHandler(carousel,item,pos) { > > newitem = carousel.get(pos); > newitem.show(); > } > function itemVisibleOutHandler(carousel,item,pos) { > newitem = carousel.get(pos); > newitem.hide(); > } > > This does something weird though. The first part works great, but then > when it gets to the outhandler, firebug says the pos and the item > params are referencing li-1 (the one that just left the stage), > however, when I run hide the visible one disapears! However, when > browsing the DOM, it says that it hid the first one! > > Does anybody have any clue what is going on here?
the problem is, that hiding items will change positions of the following items. If you hide (display: none) the first item, the second item will jump at position 1, the third at position 2 and so on... Try to work with visibility: function itemVisibleInHandler(carousel,item,pos) { $(item).css('visibility', 'visible'); } function itemVisibleOutHandler(carousel,item,pos) { $(item).css('visibility', 'hidden'); } Jan