Helly guys,
first here the jsfiddle example
and here my problem. I have 3 path's. Every path shall/should have an mouseover effect (change the fill). That works for me. 2 of the 3 path's shall/should be clickable and on a click the mouseover effect shall/should stay until I click on another (clickable) path. So the new clicked path get the effect and before clicked path loose it.
The problem ist that the click effect get removed by the mouseout function!!!
So in shorts words. The click effect should stay until i click another path AND only one path can have the clicked effect at the same time.
I hope you gyus understand my problem. Look at jsfiddle so you can better understand.
Greets.
ps: the function that on a click an div box appears with a text about the path is the second thing i need, but this works great, sou you can ignore it ;)
Take a look at this.
An important note is that if you are calling a collection of elements and you have to give each the same behavior on a certain event you have to use .on (or .delegate() for older jQuery versions).