https://jsfiddle.net/bpevmhxa/1/
How to reuse the .off
after like on second input
? Re enable or something? Any idea?
Thanks!
https://jsfiddle.net/bpevmhxa/1/
How to reuse the .off
after like on second input
? Re enable or something? Any idea?
Thanks!
I want to display
new another text.
on second input without still do nothing on first.
I don’t get it? Do you want to remove the event handler from #test1 but keep it on #test2
$('#test1').on('focus', function() {
$('p').html('another text.');
$('#test1').off('focus');
});
$('#test2').on('focus', function() {
$('p').html('new another text.');
});