Ok. So I have a structure like this:
div class=fp_YouTube
div class=player
object width=425 height=349 ... /object
/div
ol class=playlist
li id=YouTubeID_w7naKj-z5So ... /li
li id=YouTubeID_naiN5V4Q1rI ... /li
/ol
/div
And eventually what I am doing is replacing the contents of player
with a new video, based on observing a click on one of the list items
in playlist. I've done it before but I'm trying to prototypejs it
up a little nicer.
SO... I have this JS code going:
$$('div.fp_YouTube').each(function(el) {
var player = el.select('.player');
var playlist = el.select('.playlist');
playlist.select('li').each(function(video) {
console.log(video.id);
});
});
But firebug is telling me this:
iterator.call is not a function -- prototype.js (line 661)
I've noticed that if I console.log the original el variable, it
looks like div class=fp_YouTube but if I log the playlist
variable, it comes out as [ol.playlist] ... is it returning a 1-item
array? Is there something I am fundamentally misunderstanding,
something I need to do in order to work with playlist the way I've
been working with el?
Thanks in advance, and pardon this message for misfiring and sending
before I was ready.
Ian
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Prototype script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---