jQuery的宽松打破WordPress上的jQuery [英] jquery easing breaks jquery on wordpress

查看:87
本文介绍了jQuery的宽松打破WordPress上的jQuery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我将jQuery easing 1.3插件添加到我的页面时出现错误,我什至没有使用自定义缓动,但仅加载它就停止了动画元素的工作.我不是一个jQuery专家,所以我真的不知道如何调试它,但是我很确定有冲突,这是错误信息:

Im getting an error when i add the jquery easing 1.3 plugin to my page, i havent even used custom easing yet but just loading it stops animated elements working. Im not a jquery expert so i dont really know how to debug it but im fairly sure that there is a conflict, heres the error:

Uncaught TypeError: Property 'undefined' of object #<Object> is not a function

将鼠标悬停在动画元素上时会触发错误,这是我正在处理的页面:

The error is triggered when you roll over the animated elements, heres the page im working on:

http://www.pegbarandgrill.com/blog/

如果将鼠标悬停在链接上&目录中,您应该会看到一个动画菜单打开,但是这是您将收到错误消息的时间.我通过以下几行来获取jquery并进行缓动

if you roll over the links & directory you should see an animated menu open but this is when you will get the error. I sourced jquery and easing with the following lines

<script type="text/javascript" src="/wp-content/themes/pegbarAndGrill_01/script/jquery.js"></script>
<script type="text/javascript" src="/wp-content/themes/pegbarAndGrill_01/script/easing.js"></script>

如果我删除了wp_head()和wp_footer()函数,冲突也会消失.知道可能是什么问题吗?

Also if i remove the wp_head() and wp_footer() functions the conflict goes away. Any idea what the problem might be?

非常感谢

推荐答案

尝试使用

$(document).ready(function() {
...
});

它节省了我以前的时间!

It saved my time before!

这篇关于jQuery的宽松打破WordPress上的jQuery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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