@Mone, Wrote:
such notification does not exists; which kind of error do you get from the jquery plugin?
I got:
terminating; too few slides: 0
which means somehow the class for the slideshow is there, but the data (the divs to be rotated) isn't yet there. This is my bug, not yours :Smile_Ab:
@Mone, Wrote:
Even if an element is detached from the page it still exists; is it searched on the document by jquery during the animation?
This is good news :Smile_Ab: This whole concept of having DOM elements there but detached is new to me, I am not used to programming Javascript :Smile_Ag: But it makes sense. jQuery seems to find only stuff that is in the DOM and visible (found out by having a closer look :Smile_Ab: ). So when something new gets added (and I get onChangingTable for that specific field), I have to stop and start the slideshow, so that the new item also gets animated.
I am also a bit lost regarding what happens when. I have spend quite some time debugging. For example this seems not to work:
visualUpdateInfo.setStyle('codeshare','pflight slidetarget','pflight slidetarget');
if (slidenum == 0) { // first slide in dom
$('.slidetarget').cycle({ timeout: 3000, cleartype: 1, speed: 400 });
}
the plugin doesn't seem to be able to "catch" the newly inserted slide.
If I do:
if (slidenum == 0) { // first slide in dom
setTimeout(function(){
$('.slidetarget').cycle({ timeout: 3000, cleartype: 1, speed: 400 });
}, 1000);
} }
it works better. Sometimes it was working with as little timeout as 50, sometimes 500 is not enough.
Does this make any sense? Or am I seeing ghosts?
I might do that. The thing is I am using regular HTML for the Lightstreamer table for now, and jQuery only for the animations. But I have already had a quick look at the jqGridDemo, and I might switch to that. Does it make any difference?
Thanks,
Emese