$(document).ready(function(){
$(".a").click(function(){
var a = (function(){
alert(a); // Line No: 4
},another());
});
});
function another(){
alert('Now Click B'); // Alert 1
$(".b").unbind('click');
var r = 0;
$(".b").click(function(){
alert('B Clicked'); // Alert 2
return r;
});
}
<p class="a">Click A First</p>
<p class="b">Click B</p>
Alert 1 and Alert 2 work properly but
Line No: 4 does not work.
Any suggestion ???
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…