I use this to replace a 'delete' button with a watchdog timer of say 5 seconds as a confirmation. The effect is that the user has to click again to confirm an action.
Try it out here | |
Presentation | Code |
Click here |
function Confirm(Button,SomeFunction){
var b = $(Button);
var t = b.attr('title');
b.removeClass('bno').addClass('bareYouSure').on('click',SomeFunction).attr('title','Click again to confirm');
setTimeout(function(B,T){B.addClass('bno').removeClass('bareYouSure').off('click').attr('title',T);},4000,b,t);
}
function DoIt(){
alert('Done it!');
}
|
See below for a one line solution |
View details, go/visit/details, three styles of go back, external link
Information and help
Upload/send, download/get, email, menu
List navigation
List navigation disabled
Person | Details | Actions |
Fred Bloggs | ||
Mavis Huggins |