Rails App with Bootstrap Modal View containing form, submit and disappear modal view without reloading page

爱⌒轻易说出口 提交于 2019-12-04 21:36:48

close() is not a jQuery method and that is not how the Bootstrap modal library works. Also, the submit binding should be changed to be bound so that things inserted into the DOM after the binding has been setup.

You should probably change your function to something like this:

$(function () {
  $("document").on("submit", ".new_user", function() {
      $('.signup').modal("close");
  });
});

In addition, be sure that you have loaded in jQuery and the Bootstrap modal script files prior to this function.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!