Skip to content

Instantly share code, notes, and snippets.

@kwerle
Created August 31, 2010 21:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kwerle/559787 to your computer and use it in GitHub Desktop.
Save kwerle/559787 to your computer and use it in GitHub Desktop.
for (i=0; i < Math.min(arr_length, 4); i=i+1) {
idx = arr.shift();
new_loading = loading.clone(true);
loading.parentNode.appendChild(new_loading);
new_loading.show();
new Ajax.Updater(new_loading, '/goals/' + idx + '/list',
{ method: 'get',
insertion: 'after',
onSuccess: function(response) { new_loading.remove(); }
});
link = $(target).parentNode.down('.show_more');
if (arr.length < 1) { link.hide(); };
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment