callback for final iteration of .each

callback for final iteration of .each

I am using .each to iterate over an object and add elements to my page that corresponding to each property in my iterated object.  

Once I have added all the elements to my page, I want to do something like -

$('.addedElements').draggable();

Unfortunately, .each does not allow me to provide a callback to execute after the final iteration.

One suggestion in the comments of the .each help page was to check indexInArray against collection.length.  But, of course, indexInArray isn't really an index if collection is an object, it's the name of the object's current property.  And, there is no length property on Object.

I could add draggable to every element within the loop, but that would be a hit on performance.

Can we please get an afterFinalElement callback, or an event, on .each()?

Thanks
Martin