ajsr-confirm.js

Example about templates and functionality

Click over these buttons to run the examples.

OK has the focus
Cancel has the focus
No focus
OK has the focus
Cancel has the focus
No focus

Try in the console:

window.ajsrConfirm.setFocus(0);
window.ajsrConfirm.setFocus(1);
window.ajsrConfirm.setFocus(false);

Extra css styling ('default' class) will be applied in buttons' class property. Some templates will render extra styling to show the focus over the button.