I'm having real trouble getting e.preventDefault();
to work.
Here is my code
$('#ListSnapshot a').live('click', function(e){
var url = $(this).attr('href') +' #WebPartWPQ2 .ms-listviewtable';
$('#ListSnapshot').load(url);
e.preventDefault();
});
Could someone explain what I'm doing wrong, I can see the load function work but then the page redirects to the clicked link which I need to prevent.
I have also tried moving e.preventDefault();
to the top of the function, to no avail.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…