假设想要在id为target的div中append一个元素
原监听事件格式为:
$(".textBox").mouseover(function() {});
修改为:
$("#target").on("mouseover", ".textBox", function() {});
注意:id为target的盒子一定要一直存在,而不是后期动态添加的盒子!!!实在不行你就放body
假设想要在id为target的div中append一个元素
原监听事件格式为:
$(".textBox").mouseover(function() {});
修改为:
$("#target").on("mouseover", ".textBox", function() {});
注意:id为target的盒子一定要一直存在,而不是后期动态添加的盒子!!!实在不行你就放body