좋아, 당신이해야 할 것은 unmouseover
요청에 핸들러 함수를 전달할 수 있습니다 :
f
에 대해 무엇이다
// Creates canvas 320 × 200 at 10, 50
var paper = Raphael(10, 50, 320, 200);
// Creates circle at x = 50, y = 40, with radius 10
var circle = paper.circle(50, 40, 10);
// Sets the fill attribute of the circle to red (#f00)
circle.attr("fill", "#f00");
// Sets the stroke attribute of the circle to white
circle.attr("stroke", "#fff");
var mouseover = function (event) {
this.attr({fill: "yellow"});
}
var mouseout = function (event) {
this.attr({fill: "red"});
}
circle.hover(mouseover, mouseout);
circle.click(function (event) {
this.attr({fill: "blue"});
this.unmouseover(mouseover);
this.unmouseout(mouseout);
});
http://jsfiddle.net/GexHj/1/
. 또한 unhover()
를 사용할 수 있습니다
circle.click(function (event) {
this.attr({fill: "blue"});
this.unhover(mouseover, mouseout);
});
http://jsfiddle.net/GexHj/2/
질문 (40)과 함께, 나는 그들 이상의 57 %가 같은 올바른 표시 할 수있는 적절한 답변을했다 희망. :) –
아니요, 설명서에 'un'을 사용하여 해당 이벤트를 바인딩 할 수 있다고 나와 있지만 작동하지 않거나 잘못된 작업을하고 있습니다 ... 좋은 질문을 다시 선택하여 답을 선택하고, 하지만 그들 중 대부분은 아직 완전히 대답하지 못했습니다. 제 생각에 ... – Dylan
답변이있는 질문이 많지만 "올바른 답변"이 아닌 질문이있는 경우 다시 질문 할 수 있습니다. 명확하고 간결하며, 지역화되어있어 성공적으로 답변을받을 수 있는지 여부. :) –