hi i want to addClass after clicking the raphael generated object http://jsfiddle.net/v2Ykt/
i had try to this
$('#inter-mapka a').click(function(){
$('#inter-mapka a').removeClass("active");
$(this).addClass("active");
});
but nothing is happening, how can i do that
RAPHAEL
// A1
paper.path("M9,163.334 L12,163.25 L18.5,157 L80.958,157 L80.958,192 L64.5,192 L9,177.084Z").attr({"fill":"#6e3315", "stroke-width": 0, "fill-opacity": 0, "stroke": "transparent", "title": "budynek A1"}).mouseover(
function () {
this.animate({"fill-opacity": .7}, 200);
}).mouseout(function () {
this.animate({"fill-opacity": .0}, 200);
});
GENERATED HTML
<div id="inter-mapka">
<a title="budynek A1"><path style="fill-opacity: 0;" fill="#6e3315" stroke="none" d="M9,163.334L12,163.25L18.5,157L80.958,157L80.958,192L64.5,192L9,177.084Z" stroke-width="0" fill-opacity="0"/></a>
...
</div>
Sorry for the delay. I’ve had a play with this now and the only way I could get it to do what you wanted was entirely in Raphael – perhaps the DOM elements are ‘managed’ by Rapchael so the jQuery doesn’t ever really kick in properly
EDIT I’ve refactored this to simplify http://jsfiddle.net/joevallender/v2Ykt/6/