Last Updated: February 25, 2016
·
549
· pzgz

Make sure javascript click can work on nomal link

http://rors.org/demos/custom-confirm-in-rails

This is a great alternative for javascript confirm box. But I do have issue on simple anchor links with 'data-confirm' attribute set. User won't be able to redirected to the new page even confirm button has been clicked, you have to click again.

The workaround is to make sure 'data-method' of the anchor has been set, to "get" for a normal link.