为什么下面的代码会导致jquery提醒3次?jquery多次提醒
.note_text
是.note_content
中的一类。
$('.note_content').click(function() {
var note_text = $(this).find(".note_text");
$(note_text).focus();
// save its contents:
var original_text = note_text.html();
$(note_text).blur(function() {
if (note_text.html() !== original_text)
{
alert('Not the same');
}
});
});
当外部div突出显示时,我想要内部div(其中包含文本)被关注。