Skip to content
This repository was archived by the owner on Jul 29, 2022. It is now read-only.
This repository was archived by the owner on Jul 29, 2022. It is now read-only.

unbinding via destroy does not work correctly #2

@Zangetsu

Description

@Zangetsu

jeditable should use namespaced events (http://docs.jquery.com/Namespaced_Events) to bind the specified event. Otherwise calling editable('destroy') will unbind all other events bound to the selector.

Example:
$('div').click(function() {
alert('Hanlder 1 running');
});

$('div').editable('http://www.example.com/save.php');

Now calling $('div').editable('destroy') will unbind both the first handler and the handler bound via editable.

Solution:
Let jeditable bind a namespaced event. Add the following code somewhere to the initialization part of jeditables code:
settings.event += '.editable';

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions