Loading ...
Sorry, an error occurred while loading the content.

Re: [ydn-javascript] Extra LIs in Carousel with more continually added

Expand Messages
  • Gopal Venkatesan (கோபால் வ
    ... ... Hi jwpebcakerror: The number of items in the Carousel container is two, but in the Carousel s configuration you ve mentioned four (4), which
    Message 1 of 2 , Jul 29, 2009
    • 0 Attachment
      ----- "jwpebcakerror" <jwpebcakerror@...> wrote:

      > I've got something weird going on with the carousel. Its built from
      > source but a bunch of LIs are being dynamically added and as it
      > AutoPlays more continue to get added.
      >
      > Here's the code:
      >

      <big snip>

      >
      > And the js: (function () {
      > var carousel = new YAHOO.widget.Carousel("sponsors", {
      > animation: { speed: 0.5 },
      > numItems:4,
      > scrollIncrement:3,
      > autoPlayInterval:5000,
      > numVisible:3,
      > isCircular:true,
      > revealAmount:0
      > });

      Hi jwpebcakerror:

      The number of items in the Carousel container is two, but in the Carousel's configuration you've mentioned four (4), which is why it asks you to provide more items. In case you don't need dynamic loading of items, you can just skip providing the "numItems" configuration parameter and the Carousel widget would automatically compute the number of items for you.

      So, to make the above code work, you can just instantiate the Carousel with:

      var carousel = new YAHOO.widget.Carousel("sponsors", { animation: { speed: 0.5 }, autoPlayInterval: 5000, isCircular: true });

      The rest of the items are picked from the default values (which match the values that you're setting.)

      HTH.

      --
      Gopal Venkatesan
      http://g13n.in/

      Note: if you see question marks (???) after my name above, then your
      mail tool is not Unicode enabled.
      You should see my name (Gopal Venkatesan) in Tamil (கோபால் வேங்கடேசன்)




      Yahoo! recommends that you upgrade to the new and safer Internet Explorer 8. http://downloads.yahoo.com/in/internetexplorer/
    • jwpebcakerror
      AWSOME! Worked like a charm.
      Message 2 of 2 , Jul 29, 2009
      • 0 Attachment
        AWSOME! Worked like a charm.

        --- In ydn-javascript@yahoogroups.com, Gopal Venkatesan (கோபால் வேங்கடேசன்) <g13n@...> wrote:
        >
        >
        > ----- "jwpebcakerror" <jwpebcakerror@...> wrote:
        >
        > > I've got something weird going on with the carousel. Its built from
        > > source but a bunch of LIs are being dynamically added and as it
        > > AutoPlays more continue to get added.
        > >
        > > Here's the code:
        > >
        >
        > <big snip>
        >
        > >
        > > And the js: (function () {
        > > var carousel = new YAHOO.widget.Carousel("sponsors", {
        > > animation: { speed: 0.5 },
        > > numItems:4,
        > > scrollIncrement:3,
        > > autoPlayInterval:5000,
        > > numVisible:3,
        > > isCircular:true,
        > > revealAmount:0
        > > });
        >
        > Hi jwpebcakerror:
        >
        > The number of items in the Carousel container is two, but in the Carousel's configuration you've mentioned four (4), which is why it asks you to provide more items. In case you don't need dynamic loading of items, you can just skip providing the "numItems" configuration parameter and the Carousel widget would automatically compute the number of items for you.
        >
        > So, to make the above code work, you can just instantiate the Carousel with:
        >
        > var carousel = new YAHOO.widget.Carousel("sponsors", { animation: { speed: 0.5 }, autoPlayInterval: 5000, isCircular: true });
        >
        > The rest of the items are picked from the default values (which match the values that you're setting.)
        >
        > HTH.
        >
        > --
        > Gopal Venkatesan
        > http://g13n.in/
        >
        > Note: if you see question marks (???) after my name above, then your
        > mail tool is not Unicode enabled.
        > You should see my name (Gopal Venkatesan) in Tamil (கோபால் வேங்கடேசன்)
        >
        >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.