在网页上实现WOW滑块时如何解决jQuery冲突

在网页上实现WOW滑块时如何解决jQuery冲突

本文介绍了在网页上实现WOW滑块时如何解决jQuery冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 http://integritywoodcrafts.c​​om/

有一个WOW滑块样式表<link href="/slider/engine2/style.css" rel="stylesheet" type="text/css" />jQuery engine的存在为WOW滑块提供了动力.

There is a WOW Slider Style sheet <link href="/slider/engine2/style.css" rel="stylesheet" type="text/css" /> and the presence of the jQuery engine that powers the WOW Slider.

我的网站上有一个鼠标悬停菜单,每当不存在WOW滑块样式表和jQuery引擎时,该菜单都将起作用-看到网站上除主页以外的任何页面.

My site has a mouseover menu that works whenever the WOW Slider Style Sheet and the jQuery engine is not present -- see any page in the site except the home page.

但是,在主页上,当出现"WOW滑块样式表"和jQuery引擎时,鼠标悬停菜单不起作用.

Yet, on the Home Page, when the WOW Slider Style Sheet and the jQuery engine is present, the mouseover menus do not function.

我已将问题缩小到jQuery引擎,因为它会导致鼠标悬停菜单无法正常工作.

I have narrowed the issue down to the jQuery engine being the thing that causes the mouseover menus to not work properly.

有人知道导致问题的原因是什么,我该如何解决?

Does anyone have any idea what might be causing the issue and how I might correct it?

谢谢.

推荐答案

几乎可以肯定,原型和jQuery是冲突的.

It is almost certainly prototype and jQuery conflicting.

要解决此问题,请使用jQuery noConfict()(文档)

To resolve it use jQuery noConfict() (docs)

您的wowslider被称为此处,并且它已经在使用 jQuery 而不是 $ ,因此只要将wow滑块是页面上唯一的东西,只需在引用其他库和jQuery脚本引用之后放置$.noConflict();即可解决此问题.使用jQuery

Your wowslider is being called here, and it is already using jQuery instead of $, so simply putting $.noConflict(); after your references to the other libraries and jQuery script references should resolve the problem, assuming that the wow slider is the only thing on the page using jQuery

关于z-index问题,请将其放在某个地方:

As for the z-index problem, put this in somewhere:

#nav                     {z-index: 100;}
#wowslider-container2    {z-index: 1;}
.ws-title                {z-index: 1;}

应该100%工作

这篇关于在网页上实现WOW滑块时如何解决jQuery冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 04:40