[ 11 posts ] Go to page 1, 2 Next

David Mondrus

  • Username: mondrus
  • Joined: Fri Feb 04, 2011 7:32 pm
  • Posts: 8
  • Offline
  • Profile
Tags:

carousel.additem(XX,index)

Post Posted: Fri Feb 04, 2011 7:36 pm
+0-
carousel.additem('xxx') works
carouse.additem('xxx',0) doesn't

Any ideas?

thanks
David

Alberto Santini

YUI Contributor

  • Offline
  • Profile

Re: carousel.additem(XX,index)

Post Posted: Sat Feb 05, 2011 3:20 am
+0-
Hello David.

http://developer.yahoo.com/yui/docs/YAH ... od_addItem

The item to be appended to the Carousel. If the parameter is a string, it is assumed to be the content of the newly created item. If the parameter is an object, it is assumed to supply the content and an optional class and an optional id of the newly created item.

Hope that helps,
Alberto

David Mondrus

  • Username: mondrus
  • Joined: Fri Feb 04, 2011 7:32 pm
  • Posts: 8
  • Offline
  • Profile

Re: carousel.additem(XX,index)

Post Posted: Sat Feb 05, 2011 4:40 am
+0-
Yeah, I know the syntax. My understanding is that if you do additem("xxx",#") you should get the item dropped into the appropriate position #. unfortunately using that syntax doesn't work at all.

Alberto Santini

YUI Contributor

  • Offline
  • Profile
Tags:

Re: carousel.additem(XX,index)

Post Posted: Sun Feb 06, 2011 12:19 am
+0-
Hello David.

I tried that - addItem("...", slot) - and it seems it works correctly [1]
I modified Spotlight example [2]: I added a button inserting an item, for instance, at slot 1.

Any public link or a test case?

Regards,
IceBox

[1] http://pastebin.com/Nz6G7Gtm
[2] http://developer.yahoo.com/yui/examples ... ction.html

David Mondrus

  • Username: mondrus
  • Joined: Fri Feb 04, 2011 7:32 pm
  • Posts: 8
  • Offline
  • Profile

Re: carousel.additem(XX,index)

Post Posted: Sun Feb 06, 2011 2:49 am
+0-
Unfortunately I don't have publicly accessible examples, but I'm running into this issue:

if I try to do an addItem("xxx",#) and the # is > than carousel.getItems().length, it fails.
therefore I can't use that syntax it to add items to the end of the carousel.

Is that expected behavior?

Alberto Santini

YUI Contributor

  • Offline
  • Profile
Tags:

Re: carousel.additem(XX,index)

Post Posted: Mon Feb 07, 2011 10:31 am
+0-
Hello David.

I think you get the following bug:
http://yuilibrary.com/projects/yui2/ticket/2527990

Regards,
IceBox

David Mondrus

  • Username: mondrus
  • Joined: Fri Feb 04, 2011 7:32 pm
  • Posts: 8
  • Offline
  • Profile

Re: carousel.additem(XX,index)

Post Posted: Mon Feb 07, 2011 12:38 pm
+0-
Yep, it certainly looks like it.

Now here's the question:

Once that bug is resolved will I be able to have a carousel with data populated like this:

XXXX_______XXXX___XXXXX

or can it only be continuous: XXXXXXXXXXXXXXXXX

?

Thanks
David

Alberto Santini

YUI Contributor

  • Offline
  • Profile

Re: carousel.additem(XX,index)

Post Posted: Mon Feb 07, 2011 2:10 pm
+0-
Hello David.

I think you cannot leave holes, but you might use a "special" item to create separations between group of items, if I understood correctly your needs.

Regards,
IceBox

David Mondrus

  • Username: mondrus
  • Joined: Fri Feb 04, 2011 7:32 pm
  • Posts: 8
  • Offline
  • Profile
Tags:

Re: carousel.additem(XX,index)

Post Posted: Mon Feb 07, 2011 2:21 pm
+0-
Yeah, but the problem is that my data set is 1500 items. It takes nearly 5 minutes for the carousel to load that. If I could leave holes I could load the front and the back and then it would only be 100 items.

Any suggestions?

David Mondrus

  • Username: mondrus
  • Joined: Fri Feb 04, 2011 7:32 pm
  • Posts: 8
  • Offline
  • Profile

Re: carousel.additem(XX,index)

Post Posted: Sun Feb 13, 2011 2:09 am
+0-
Any idea when 2.9 will be released?
  [ 11 posts ] Go to page 1, 2 Next
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum