I know this question is old but this was my first time I had to use a confirmation dialog. I think this is the shortest way to do it.
$(element).onClick(function(){ // This can be a function or whatever, this is just a trigger
var conBox = confirm("Are you sure ?");
if(conBox){
// Do what you have to do
}
else
return;
});
I hope you like it :)