简体   繁体   English

on $(document).foundation(); 未捕获的TypeError:无法读取未定义的属性“top”

[英]on $(document).foundation(); Uncaught TypeError: Cannot read property 'top' of undefined

I'm using several foundation plugins on this page. 我在这个页面上使用了几个基础插件。 Equalizer, and Reveal. 均衡器和显示。 When the foundation initializer is being called it throws Uncaught TypeError: Cannot read property 'top' of undefined on the <script>$(document).foundation();</script> call. 当调用基础初始化程序时,它会抛出Uncaught TypeError: Cannot read property 'top' of undefined<script>$(document).foundation();</script>调用中Uncaught TypeError: Cannot read property 'top' of undefined

I assume it's related to the markup being parsed associated to one of the plugins. 我假设它与被解析的标记关联到其中一个插件有关。 Here's the markup... 这是标记......

Equalizer... 均衡器...

   <div class="row" data-equalizer>
                <div class="overlay large-4 large-offset-4 columns clearfix">
                   ... text
                </div>
                <div class="large-4 columns clearfix">
                ... text
                </div>
   </div>

Reveal... 揭示...

<a id="terms" href="terms.php" data-reveal-id="termsModal" target="_blank" data-reveal-ajax="terms.php">Terms &amp; Conditions</a></label>

After troubleshooting a bit more, I realized the equalizer plugin was missing some markup. 经过多次故障排除后,我意识到均衡器插件缺少一些标记。

I needed to add the data-equalizer-watch attribute on the child nodes. 我需要在子节点上添加data-equalizer-watch属性。

<div class="row" data-equalizer>
   <div class="large-6 columns panel" data-equalizer-watch>
    ....

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 未捕获的类型错误:无法读取未定义的属性“顶部” - Uncaught TypeError: Cannot read property ‘top’ of undefined 未捕获的TypeError:无法读取未定义的属性“ top” - Uncaught TypeError: Cannot read property 'top' of undefined 未捕获的TypeError:无法读取未定义的属性“ top” - Uncaught TypeError: Cannot read property 'top' of undefined 未捕获的类型错误:无法读取未定义的属性“顶部” - Uncaught TypeError: Cannot read property 'top' of undefined 未捕获的TypeError:无法读取未定义的属性“ top” - Uncaught TypeError: Cannot read property 'top' of undefined 未捕获的类型错误:无法读取未定义的属性“文档” - Uncaught TypeError: Cannot read property 'document' of undefined 购物车飞未捕获的TypeError:无法读取未定义的属性“顶部” - Cart to Fly Uncaught TypeError: Cannot read property 'top' of undefined 图表 JS 错误:未捕获的类型错误:无法读取未定义的属性“顶部” - Chart JS Error : Uncaught TypeError: Cannot read property 'top' of undefined jQuery Uncaught TypeError:无法读取未定义的属性“ top” - jQuery Uncaught TypeError: Cannot read property 'top' of undefined Uncaught TypeError:无法读取未定义的属性“ top”-滚动错误? - Uncaught TypeError: Cannot read property 'top' of undefined - Scrolling error?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM