[Proto-Scripty] Re: iterator.call is not a function

2009-07-02 Thread ColinFine
On Jul 1, 6:16 pm, Ian R i...@fairmountfair.com wrote: $$('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);    

[Proto-Scripty] Re: iterator.call is not a function

2009-07-01 Thread Alex McAuley
Is it returning an array ? Check with $$('div.fp_YouTube').each(function(el) { var player = el.select('.player'); var playlist = el.select('.playlist'); alert(playlist); // see if its an object return; playlist.select('li').each(function(video) { console.log(video.id); }); }); if it is

[Proto-Scripty] Re: iterator.call is not a function

2009-07-01 Thread Ian R
I did check on the array situation -- it's so good and bad that finally turning to this forum and *writing it all down* usually solves the problem! In the above case, $(playlist).select('li').each didn't work, but playlist[0].select('li').each does. I'm not sure that I exactly LOVE how that

[Proto-Scripty] Re: iterator.call is not a function

2009-07-01 Thread Rick Waldron
The reason you need to use an index on playlist is because select returns an array, so... instead of using the index[0] the way you've done, you can send it back to the el.select(): $$('div.fp_YouTube').each(function(el) { var player = el.select('.player')[0]; // --- right here!