CopyPastor

Detecting plagiarism made easy.

Score: 0.859832735590241; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2019-07-10
by Pankaj Shinde

Original Post

Original - Posted on 2014-01-02
by mtl



            
Present in both answers; Present only in the new answer; Present only in the old answer;

`.unbind()` is deprecated and you should use the `.off()` method instead. Simply call `.off()` right before you call `.on()`.
This will remove all event handlers:
$(element).off().on('click', function() { // function body });
To only remove registered 'click' event handlers:
$(element).off('click').on('click', function() { // function body });
`.unbind()` is deprecated and you should use the [`.off()`](http://api.jquery.com/off/) method instead. Simply call `.off()` right before you call `.on()`.
This will remove all event handlers:
$(element).off().on('click', function() { // function body });
To only remove registered 'click' event handlers:
$(element).off('click').on('click', function() { // function body });

        
Present in both answers; Present only in the new answer; Present only in the old answer;