Hello
I'm having some issues with using selector - I've an image element
that gets added to the DOM with some delay - what I came up with so
far is this:
findImageElement: function(marker) {
id = marker.get('id');
dbug.log(id);
try {
el = self.mapCanvas.getElements('img[src$=' +
id + ']')[0];
if (!$chk(el)) throw "error";
dbug.log('element found');
} catch(e) {
this.findImageElement.delay(500, marker);
}
},
the problem I'm having is that recalling the function in the catch
part doesn't pass the marker element again to the function.
I'm kind of lost on this one - is there a better way to do this and if
not, what is the proper way anyway.
Hope somebody can help please.
Thanks