ajax jquery prevent

Code to Run
$('#' + id).html('<a href=&quot;http://www.smashingmagazine.com&quot;>http://www.smashingmagazine.com</a>');
$('#' + id + ' a').live('click', function (e) {
    e.preventDefault();
    $('#' + id).html('Prevented going to http://www.smashingmagazine.com and displayed this message instead.');
});
Code to Reset
$('#' + id).empty().hide();

댓글