0
var change_sample = [];
$(document).ready(function() {
/* Create sketchpad for all elements */
for (var i = 1; i <= 32; i++) {
var temp = "tooth" + (i);
change_sample[i] = Raphael.sketchpad(temp, {
width: 57,
height: 85,
editing: true
});
}
/* bind change event to all skecth pad objects */
for (var j = 1; j <= change_sample.length; j++) {
// var temp = "tooth" + (j);
change_sample[j].change(function() {
alert("sdfgsd"`enter code here` + $(this).json());
});
}
我能夠改變事件中得到即得到警報,但無法得到change_sample [J]內部實例化skecthpad功能.json()或$(this).json()。 在此先感謝無法在skecthpad.change獲得拉斐爾畫板skecthpad.json()()當循環