So I started off with the error because e.preventDefault doesn't work in IE7. I found event.preventDefault() function not working in IE on here and implemented the answer - the problem is that where
event.returnValue = false;
seems to work for everyone else there, it doesn't for me! I also put in
if (event.returnValue) {
alert();
}
And got no alert. Here is my code
$('#share a').click(function(e){
if (event.preventDefault) {
event.preventDefault();
} else {
window.event.returnValue = false;
}
if ($(this).parent('li').hasClass('email')) {
window.open(this.href,'share-this','height=750,width=500,status=no,toolbar=no');
} else {
window.open(this.href,'share-this','height=400,width=500,status=no,toolbar=no');
}
}
When I click the link I get an Invalid argument error in IE7 on the ternary operator line. I know it is hitting event.returnValue = false; because I put an alert in there to debug.
Any ideas?