2

Normally, as I understand, you return false from jQuery click handler, and that stops click from going further. How would I achive the same behavior with Ajax.ActionLink? Tree items use click to expand and collaps, and clicking on Ajax.ActionLink causes both action link to be executed and tree item collapsed/expanded.

4

1 回答 1

1

尝试使用event.preventDefault(); event.stopPropagation();

$('#yourdiv a.collapse').live('click',function(event){
    event.stopPropagation();
    event.preventDefault();
});
于 2011-08-21T16:56:07.743 回答