views:

152

answers:

1

Hi, I'm trying to create a basic confirmation box which prompts users with a simple confirm/cancel when they click on a link.

This is working fine in FF and IE, however Chrome just seems to ignore it.

Can anyone see why this might not be working?

//Confirm Duplication        
$("a[href*=duplicate]").click(function(event){         
   var answer = confirm("Duplicate?")     
   if(!answer){
      event.preventDefault();    
   }
 });

Any advice appreciated. Thanks.