how to add an "onclick" function to a marker?
I have a marker such as this
var feature = new OpenLayers.Feature.Vector(
new OpenLayers.Geometry.Point( lng,lat ).transform(epsg4326, projectTo),
{description:'something'} ,
{externalGraphic: 'somepic.png', graphicHeight:34, graphicWidth: 21, graphicXOffset:0,
graphicYOffset:0 });
vectorLayer.addFeatures(feature);
map.addLayer(vectorLayer);
i was wondering if there is a way to add onclick function to the markers, so an example use would be something like
feature.onClick(function (){
alert("clicked");
});