Is the following syntax the proper way to bind and unbind event in plugin so
that you minimize the chance you will unbind and event that you did not set?

$(selector).bind('event.custom_tag', function);

so if you take the following:

$('#binding_test').bind('click.part1', function()
{
        alert('part1');
});

$('#binding_test').bind('click.part2', function()
{
        alert('part2');
});
                        
$('#binding_test').unbind('click.part1');

at the end of the code click.part2 is still working but the other one does
not.  currently i just do unbind('event') which could unbind event i did not
set.  I want to make cure this is the proper way of doing things and the
most current(will this functionality be in jquery 1.3, 1.4, 1.5, etc...) so
i can update all my plug-ins.
-- 
View this message in context: 
http://www.nabble.com/Proper-way-of-binding-unbinding-event-in-plug-ins-tp21299054s27240p21299054.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to