嗨,我想在单击 raphael 生成的对象http://jsfiddle.net/v2Ykt/后添加类
我试过这个
$('#inter-mapka a').click(function(){
$('#inter-mapka a').removeClass("active");
$(this).addClass("active");
});
但什么都没有发生,我该怎么做
拉斐尔
// 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);
});
生成的 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>