Skip to content

Instantly share code, notes, and snippets.

@kinsteronline
Created July 30, 2013 23:08
Show Gist options
  • Save kinsteronline/6117872 to your computer and use it in GitHub Desktop.
Save kinsteronline/6117872 to your computer and use it in GitHub Desktop.
hiding package li with recursion
removeSlice = offersOnScreen.slice(-offerPackagesPerPage).toArray()
removePackage = (pkgs) ->
pkg = pkgs.pop()
if pkg
$(pkg).fadeOut 100, ->
$(this).remove()
removePackage(pkgs)
removePackage(removeSlice)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment