Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/77.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 在ajax加载按钮后重新启动引导模式_Javascript_Jquery_Ajax_Twitter Bootstrap 3 - Fatal编程技术网

Javascript 在ajax加载按钮后重新启动引导模式

Javascript 在ajax加载按钮后重新启动引导模式,javascript,jquery,ajax,twitter-bootstrap-3,Javascript,Jquery,Ajax,Twitter Bootstrap 3,我有一个div,在这个div中,我加载一个按钮,打开bootstrap 3模式: <div id="test"> Here comes the button... </div> 但是我如何重新启动Bootstrap 3(在ajax加载div中的按钮之后),以便打开模式?您需要使用数据目标而不是目标来指向您的模式: <button data-toggle="modal" data-target="#modal&quo

我有一个div,在这个div中,我加载一个按钮,打开bootstrap 3模式:

<div id="test">
Here comes the button...
</div>
但是我如何重新启动Bootstrap 3(在ajax加载div中的按钮之后),以便打开模式?

您需要使用数据目标而不是目标来指向您的模式:

<button data-toggle="modal" data-target="#modal">Open the modal</button>
打开模式对话框
通过jax加载按钮后,无需重新初始化Bootstrap3模块

<button data-toggle="modal" data-target="#modal">Open the modal</button>