如何修复Window.getComputedStyle不是一个对象错误 [英] How to fix Window.getComputedStyle is not an object error

查看:858
本文介绍了如何修复Window.getComputedStyle不是一个对象错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用可用于
的可变性 https://github.com/desandro/draggabilly

I am trying to use draggabilly available at https://github.com/desandro/draggabilly

它在html中工作正常。现在我试图添加到wordpress。我在firebug控制台中遇到以下错误。

it works fine in html. Now when i have tried to add it in wordpress. I am getting following error in firebug console.

TypeError: Argument 1 of Window.getComputedStyle is not an object.
return s.getComputedStyle(t, null)

这里是js文件的一个链接
http://draggabilly.desandro.com/draggabilly.pkgd.min.js

here is a link for js file http://draggabilly.desandro.com/draggabilly.pkgd.min.js

推荐答案

你正在调用init两次。通过代码,删除一个实例。

You are calling init twice. Go through your code and remove one instance.

这篇关于如何修复Window.getComputedStyle不是一个对象错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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