Jquery 当点击弹出窗口上的关闭按钮时,如何始终关闭弹出窗口?

Jquery 当点击弹出窗口上的关闭按钮时,如何始终关闭弹出窗口?,jquery,ruby-on-rails,Jquery,Ruby On Rails,1) listing.html.erb <a class="book_btn" role="button" href="/web/sign_in_user?onward_schedule_id=<%=onward_schedule_id%>&return_schedule_id=<%=return_schedule_id%>&return_date=<%=params[:return_date]%>&is_from_book_li

1) listing.html.erb

<a class="book_btn" role="button" href="/web/sign_in_user?onward_schedule_id=<%=onward_schedule_id%>&return_schedule_id=<%=return_schedule_id%>&return_date=<%=params[:return_date]%>&is_from_book_link=true" data-toggle="modal" data-target="#popup_div" data-remote="true"> Book </a>

2) 点击一本书就会弹出一个窗口

3) 在弹出窗口上有一个关闭按钮。当用户单击“关闭”按钮时,将弹出 走开


4) 但是,当用户再次单击“书本”按钮时,不应出现弹出窗口,而应继续下一步操作。

假设用户单击“关闭”按钮时,此时从按钮标签中删除一些属性。像这样

$("close_button").click(function(){
    // Here the code which will close your popup and then
    $(".book_btn").removeAttr("data-toggle").removeAttr("data-target");
});
上面的一行将永久删除这些属性,因此弹出窗口将不会再次显示给该用户,并将在下一步进行处理


试一试,看看会发生什么。

假设当用户单击关闭按钮时,会从按钮标签中删除一些属性。像这样

$("close_button").click(function(){
    // Here the code which will close your popup and then
    $(".book_btn").removeAttr("data-toggle").removeAttr("data-target");
});
上面的一行将永久删除这些属性,因此弹出窗口将不会再次显示给该用户,并将在下一步进行处理


试一试,看看会发生什么。

假设当用户单击关闭按钮时,会从按钮标签中删除一些属性。像这样

$("close_button").click(function(){
    // Here the code which will close your popup and then
    $(".book_btn").removeAttr("data-toggle").removeAttr("data-target");
});
上面的一行将永久删除这些属性,因此弹出窗口将不会再次显示给该用户,并将在下一步进行处理


试一试,看看会发生什么。

假设当用户单击关闭按钮时,会从按钮标签中删除一些属性。像这样

$("close_button").click(function(){
    // Here the code which will close your popup and then
    $(".book_btn").removeAttr("data-toggle").removeAttr("data-target");
});
上面的一行将永久删除这些属性,因此弹出窗口将不会再次显示给该用户,并将在下一步进行处理


试一试,看看会发生什么。

真的很有用……谢谢。我很高兴能帮上忙。谢谢。真的很有用。谢谢。我很高兴能帮上忙。谢谢。真的很有用。谢谢。我很高兴能帮上忙。谢谢。真的很有用。谢谢。我很高兴能帮上忙。非常感谢。