[英]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 & 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.