So I have been using raphael to create a user interface and want it so that way if someone clicks on a circle it highlights the circle or does some sort of visually interesting thing to the circle to note that it is selected. I’m not terribly worried about the visual side of this yet. I am trying to figure out a way to make this happen and nothing seems to be working. This is rather simple. At least I thought so but it turns out this has been giving me a nice headache. I would provide code but what I have is a mess right now. If you want it I will add it though.
function elemClick(el)
{
el.click(function(){
circleSelectedArray[0] = true;
});
el.unclick(function(){
circleSelectedArray[0] = false;
});
}
You cant bind click and unbind it at the same time ….
USE -> if you go like this
el.unclick()all click events will be unbound from that elementif you want to use one function ….
I just have a hunch that you were perhaps trying to use mousedown and mouseup events ….
EDIT : to your requirements