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.
Written by Leon Guan
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#