- I suppose you could store them in an array, like:
var ddImgObjects =  ;
ddImgs.push( new YAHOO.util.DD( allimages[i] ) ) ;
...or write your own "DDImgCollection" object to handle addition/deletion of new DD objects you wish to keep track of.
This may not be the best performance-wise but at least you'll get a collection of objects to work with.
Say I want to make all images on a page draggable. If I loop after
using document.getElement sByTagName( "img") to get all the images, how
can I draggability for each image? In other words, using the example
var dd1 = new YAHOO.util.DD( "element1" ); how could I dynamically
increment dd1 to dd2, dd3, etc. without knowing how many images are on
var allimages = document.getElement sByTagName( "img");
for(var i=0;i<allimages. length;i+ +)
var dd1 = new YAHOO.util.DD( allimages[ i]);