更改类时超出最大调用堆栈大小 - Bootstrap,jQuery [英] Maximum call stack size exceeded when changing a class - Bootstrap, jQuery

查看:108
本文介绍了更改类时超出最大调用堆栈大小 - Bootstrap,jQuery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用jQuery 2.1.1,jQuery UI 1.11,Bootstrap 3.2,Fuel UX 2.3(仅适用于表单向导)和BootstrapValidator v0.5.1-dev。

<在Fuel UX Wizard中,我有一个巨大的引导表单,包含BootstrapValidator验证,以及大量的事件和东西的jQuery(总页数为1900行,这就是为什么我没有提供任何代码)。 >

我的所有表单都有一个带类col-xs-8的div,一切正常。然后,我将它改为class =container(仅在代码中进行了更改,并多次来回播放),现在Chrome的控制台显示:

 未捕获的RangeError:超过最大调用堆栈大小

为什么?



我已经检查过调用堆栈,除了jQuery函数外,没有什么东西(所以它不应该是我或BootstrapValidator已经启动的东西,应该这样做?)。



我有另一个页面,环境相同,大小相似,代码相似 - 从.col-xs-8到.container的更改没有任何问题。 p>

更新:我发现如果我离开没有类的主div,我也会得到RangeError。 Sooo这里是我的JS https://gist.github.com/sofixa/be2e575cf8a198c1cf89

解决方案

如果您的表单不是由Bootstrap类构建的(包含字段和相关标签的元素没有form-group类),您将看到错误:

 未捕获的RangeError:超过最大调用堆栈大小

参考:最大调用堆栈大小超出错误警告在官方文档中。

I'm using jQuery 2.1.1, jQuery UI 1.11, Bootstrap 3.2, Fuel UX 2.3 (for the form wizard only) and BootstrapValidator v0.5.1-dev.

I have a huge bootstrapped form in a Fuel UX Wizard, with BootstrapValidator validation, along with a ton of jQuery for events and stuff(the total page is 1900 lines, that's why i haven't provided any code).

I had a div with class col-xs-8 around all of my form, everything was working fine. Then i changed it to class="container" (only change in the code, played it a couple of times back and forth), and now Chrome's console says :

Uncaught RangeError: Maximum call stack size exceeded 

Why?

I have checked the call stack, there's nothing but jQuery functions there(so it shouldn't be something i or the BootstrapValidator has launched, should it?).

I have another page, with the same enviorenement, similar size and similar code - there the change from .col-xs-8 to .container went without issues.

Update: I discovered that if i leave the main div without a class, i also get the RangeError. Sooo here's my JS https://gist.github.com/sofixa/be2e575cf8a198c1cf89

解决方案

If your form is NOT structured by Bootstrap classes (the element containing field and associated label does NOT have form-group class), you will see the error :

Uncaught RangeError: Maximum call stack size exceeded

Reference : Maximum call stack size exceeded error warning in the official docs.

这篇关于更改类时超出最大调用堆栈大小 - Bootstrap,jQuery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆