Hum i ran into an problem with getElement:
var area = myImagemap.getElement('area[coords=132,4,183,83]');
gives me always the first area tag found
i think its because of "expression = expression.split(',');" in Selectors.js
better to use something like
Array.implement({
filterFirst: function(fn, bind){
for (var i = 0, l = this.length; i < l; i++) {
if (fn.call(bind, this[i], i, this)) return this[i];
}
return false;
}
});
var area = myImageMap.getElements('area').filterFirst(function (element) {
if (element.get('coords') == '132,4,183,83') return true;
});
or is there a more elegant way ?