Because the parent layer needs to use js to obtain the elements in the child iframe, so
$('.base')[0].onload = function(){
$("#id").click(alert(1));
}
Now I find that every time the sub-layer is refreshed, clicking an element on the parent layer will superimpose it once
In other words, the first click will bounce once 1
Then refresh the sub-layer once, and click once again, it will bounce How to avoid 1
twice?
巴扎黑2017-05-19 10:10:26
$("#id").click(alert(1));
click之前先解绑
$("#id").unbind('click').click(alert(1));