Hi Christoph
   Added a new release that includes the option 'lazy' that makes the
plugin go look for the items again each time, this way you can add/
remove/reorder the items and it still works. You need to do something
like the last example in the demo:
   http://www.freewebs.com/flesler/jQuery.SerialScroll/

Instead of binding to the click event of the prev/next links, bind to
a custom event, and you handle the clicks yourself. If the element to
scroll to, is not loaded yet, you load it and only then you trigger
the custom event on the next link.

Note that you need some sort of trick to always have an element in the
end, so I'd just add an empty element with display:none that is
matched by the 'items' selector. Then in the onBefore, you check: if
the elem (2nd argument) is the empty div, you know you need to load a
new element and don't forget to add it BEFORE the empty element.

Cheers

Ariel Flesler

On 16 feb, 20:30, Ariel Flesler <[EMAIL PROTECTED]> wrote:
> Hi Christoph, SerialScroll can be used with AJAX (actually can't now,
> but I'll add a release on monday with a small change that will allow
> it). Combining that change, with a custom event like the last example
> in the demo, you can easily use it for AJAX content.
> Just a note, this plugin:http://plugins.jquery.com/project/LocalScroll
> which is SerialScroll "sibling" :), already has an AJAX demo if you
> want to check, I was wanting to give SerialScroll that option too but
> couldn't figure out in what way, now I know..
> I'll post here when the new release is up, and I'll tell you how.
>
> Ariel Flesler
>
> On 16 feb, 06:23, Christoph Haas <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Thu, Feb 14, 2008 at 01:24:40PM -0800, Ariel Flesler wrote:
> > > The newborn:http://plugins.jquery.com/project/SerialScroll
>
> > Very nice, Ariel. This is pretty close to what I'm looking for. Is there
> > a way to use it with AJAX? I'm trying to build a paginated view where
> > the user can click on the right arrow, a new DIV is loaded from the web
> > service and then scrolled to the left. Think of it as a slideshow where
> > the DIVs are not yet present in the HTML page (perhaps even with
> > preloading the images in the new DIV). I also experimented with the
> > "cycle" plugin but wasn't very successful.
>
> > Has anyone perhaps done something like that?
>
> > Kindly
> >  Christoph
> > --
> > [EMAIL PROTECTED]  www.workaround.org   JID: [EMAIL PROTECTED]
> > gpg key: 79CC6586         fingerprint: 
> > 9B26F48E6F2B0A3F7E33E6B7095E77C579CC6586- Ocultar texto de la cita -
>
> - Mostrar texto de la cita -

Reply via email to