I have the following snippet that returns some youtube identifiers. Now I want to change the result (because now it is the last first)
if (options.slideshow) { var links = []; var $lis = holder.parents('#yt_holder').find('li'); var $as = $lis.children('a'); for(var count = $lis.length-1, i = count; i >= 0; i--){ links.push(youtubeid($as[i].href)); } slideshow = '&playlist=' + links + ''; alert(slideshow); }
I tried .reverse (), but some elements seem to be missing, then
links.reverse().push(youtubeid($as[i].href));
Any help would be appreciated. Ceasar
source share