.bind('click') is faster because you bind it directly to the element, .find() must first find the element inside the #jobinfo element and then bind the appropriate event..

there is no difference between .bind('click') and .click(), .click is just an alias for .bind('click').. and if i'm not mistaken, .click was taken out of the core since 1.1 (i may be wrong, i know some aliases were removed, but not sure which - so i just use .bind for everything :))..

dennis.

Shelane Enos wrote:
What is the difference, advantage/disadvantage of these different methods:

bindEdit = function(){
$j('#edit').bind("click", function(){
            var linkval = $(this).attr("href");
            $j('#jobinfo').load(linkval, function(){
                bindEdit();
            });
            return false;
        });
}

bindEdit = function(){
$j('#jobinfo').find('#edit').click(function(){
            var linkval = $(this).attr("href");
            $j('#jobinfo').load(linkval, function(){
                bindEdit();
            });
            return false;
        });
}




Reply via email to