我的程序中有这段代码,但是该事件没有从 Codepen 中的 JS 执行任何操作,但是当我从 Debug View 将其粘贴到 javascript 控制台中时,它可以工作。
$('.peg-row--selected').children().click(function(e) {
console.log("hi");
$(e.target).attr('data-peg',$('.peg-selector--selected').attr('data-peg'));
});
我的程序中有这段代码,但是该事件没有从 Codepen 中的 JS 执行任何操作,但是当我从 Debug View 将其粘贴到 javascript 控制台中时,它可以工作。
$('.peg-row--selected').children().click(function(e) {
console.log("hi");
$(e.target).attr('data-peg',$('.peg-selector--selected').attr('data-peg'));
});