Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/69.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 使用jQuery内部加载引导模式-中断原始模式_Javascript_Jquery_Html_Twitter Bootstrap_Modal Dialog - Fatal编程技术网

Javascript 使用jQuery内部加载引导模式-中断原始模式

Javascript 使用jQuery内部加载引导模式-中断原始模式,javascript,jquery,html,twitter-bootstrap,modal-dialog,Javascript,Jquery,Html,Twitter Bootstrap,Modal Dialog,我有一个引导模式,它使用requireJS在内部加载jQuery并运行JS,在模式中显示输出 此设置对于第一次打开modal非常有效。如果我关闭模态并再次尝试打开它: $("#modalLogin").modal(); 我得到: TypeError: undefined is not a function 在modal中加载jQuery似乎破坏了主页的jQuery modal功能。在我关闭模式后,有没有办法在原始页面中重新启用.modal()方法?根据 您可以调用.modal()来启动它,无

我有一个引导模式,它使用requireJS在内部加载jQuery并运行JS,在模式中显示输出

此设置对于第一次打开modal非常有效。如果我关闭模态并再次尝试打开它:

$("#modalLogin").modal();
我得到:

TypeError: undefined is not a function
在modal中加载jQuery似乎破坏了主页的jQuery modal功能。在我关闭模式后,有没有办法在原始页面中重新启用.modal()方法?

根据

您可以调用.modal()来启动它,无论有无选项

但是,当您要打开/隐藏该方法时,必须精确该方法:

$('#modalLogin').modal('show');

我也在使用modals,但我总是在
modal()
函数中编写一个关键字
hide
show
,它每次都在工作。您是否尝试打开和关闭空白模式?您是否调试了从内部删除查询(为什么也在那里加载它?)我可以毫无问题地打开和关闭空模式。当我将内容加载到模式中时,打开模式停止工作。很抱歉回答晚了,但内容是什么?这也是你说的问题吗?或者您是否尝试过在不包含查询的情况下再次执行此操作?