Raphael Mouse over move out event
<%@ Page Language="Java"ContentType="text/html; Charset=utf-8"pageencoding="UTF-8"%><% StringPath=Request.getcontextpath (); StringBasePath=Request.getscheme ()+ "://" +Request.getservername ()+ ":" +Request.getserverport ()+Path+ "/";%><!DOCTYPE HTML><HTML><Head><Basehref= "<%=basePath%>"><Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8"><title>Title</title><Scripttype= "Text/javascript"src= "Js/jquery-1.11.1.js"></Script><Scripttype= "Text/javascript"src= "Js/raphael.js"></Script><Scripttype= "Text/javascript"src= "Js/index010.js"></Script></Head><Body><DivID= "Container"></Div></Body></HTML>
$(function() {Initraphael ();});functionInitraphael (e) {varpaper = Raphael (0, 0, 500, 500); //var s = paper.rect (+, +, +). attr (' Fill ', ' red '); //S.click (function (e) { //this.attr (' Fill ', ' blue '); // }); //line Segment Click some problems, easy to click Not on; varp = Paper.path (' m10,10l200,200 '); P.click (function(e) {varSW = This. attr (' Stroke-width '); if(SW = = 1) { This. attr (' Stroke-width ', 2); } Else { This. attr (' Stroke-width ', 1); }}). mouseover (function(e) { This. attr (' Stroke-width ', 2); }). mouseout (function(e) { This. attr (' Stroke-width ', 1); }); varSquare = Paper.rect (max, ten, +). attr (' Fill ', ' steelblue '); varCircle = paper.circle (+, +). attr (' Fill ', ' yellow '); varEllipse = Paper.ellipse (A, a, a, a). attr (' Fill ', ' orange '); varStuff =Paper.set (); Stuff.push (square, Circle, ellipse); varlabel = Paper.text (Ten, ' Mouse over a object '). attr (' Text-anchor ', ' Start ');//Stuff.mouseover (function (e) {//label.attr ({//' text ': this.attr (' Fill '),//X:e.clientx,//Y:e.clienty// });//}). mouseout (function (e) {//label.attr (' text ', ' Mouse over an object ... ');// }); //Stuff Mouse Event ImprovementsStuff.mouseover (function(e) {label.attr (' Text ', This. attr (' Fill ')); }). MouseMove (function(e) {label.attr ({x:e.clientx+10, y:e.clienty}); }). mouseout (function(e) {label.attr ({x:10, y:10, Text:' Mouse over an object ... ' }) });}
Raphael Mouse over move out event