Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/408.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
基础3导航和FANCYBOX JavaScript冲突 当使用基础3时,我发现JavaScript有冲突,当使用Fox box灯箱JavaScript时,顶部的NavaDROP下拉不会显示。我曾使用Fancy Box javascript在Gallery页面上显示图像,但现在导航下拉菜单在该页面上不起作用 这是基金会为导航提供的JavaScript: ;(function ($, window, undefined) { 'use strict'; $.fn.foundationNavigation = function (options) { var lockNavBar = false; // Windows Phone, sadly, does not register touch events :( if (Modernizr.touch || navigator.userAgent.match(/Windows Phone/i)) { $(document).on('click.fndtn touchstart.fndtn', '.nav-bar a.flyout-toggle', function (e) { e.preventDefault(); var flyout = $(this).siblings('.flyout').first(); if (lockNavBar === false) { $('.nav-bar .flyout').not(flyout).slideUp(500); flyout.slideToggle(500, function () { lockNavBar = false; }); } lockNavBar = true; }); $('.nav-bar>li.has-flyout', this).addClass('is-touch'); } else { $('.nav-bar>li.has-flyout', this).on('mouseenter mouseleave', function (e) { if (e.type == 'mouseenter') { $('.nav-bar').find('.flyout').hide(); $(this).children('.flyout').show(); } if (e.type == 'mouseleave') { var flyout = $(this).children('.flyout'), inputs = flyout.find('input'), hasFocus = function (inputs) { var focus; if (inputs.length > 0) { inputs.each(function () { if ($(this).is(":focus")) { focus = true; } }); return focus; } return false; }; if (!hasFocus(inputs)) { $(this).children('.flyout').hide(); } } }); } }; })( jQuery, this );_Javascript_Jquery_Fancybox_Zurb Foundation_Fancybox 2 - Fatal编程技术网

基础3导航和FANCYBOX JavaScript冲突 当使用基础3时,我发现JavaScript有冲突,当使用Fox box灯箱JavaScript时,顶部的NavaDROP下拉不会显示。我曾使用Fancy Box javascript在Gallery页面上显示图像,但现在导航下拉菜单在该页面上不起作用 这是基金会为导航提供的JavaScript: ;(function ($, window, undefined) { 'use strict'; $.fn.foundationNavigation = function (options) { var lockNavBar = false; // Windows Phone, sadly, does not register touch events :( if (Modernizr.touch || navigator.userAgent.match(/Windows Phone/i)) { $(document).on('click.fndtn touchstart.fndtn', '.nav-bar a.flyout-toggle', function (e) { e.preventDefault(); var flyout = $(this).siblings('.flyout').first(); if (lockNavBar === false) { $('.nav-bar .flyout').not(flyout).slideUp(500); flyout.slideToggle(500, function () { lockNavBar = false; }); } lockNavBar = true; }); $('.nav-bar>li.has-flyout', this).addClass('is-touch'); } else { $('.nav-bar>li.has-flyout', this).on('mouseenter mouseleave', function (e) { if (e.type == 'mouseenter') { $('.nav-bar').find('.flyout').hide(); $(this).children('.flyout').show(); } if (e.type == 'mouseleave') { var flyout = $(this).children('.flyout'), inputs = flyout.find('input'), hasFocus = function (inputs) { var focus; if (inputs.length > 0) { inputs.each(function () { if ($(this).is(":focus")) { focus = true; } }); return focus; } return false; }; if (!hasFocus(inputs)) { $(this).children('.flyout').hide(); } } }); } }; })( jQuery, this );

基础3导航和FANCYBOX JavaScript冲突 当使用基础3时,我发现JavaScript有冲突,当使用Fox box灯箱JavaScript时,顶部的NavaDROP下拉不会显示。我曾使用Fancy Box javascript在Gallery页面上显示图像,但现在导航下拉菜单在该页面上不起作用 这是基金会为导航提供的JavaScript: ;(function ($, window, undefined) { 'use strict'; $.fn.foundationNavigation = function (options) { var lockNavBar = false; // Windows Phone, sadly, does not register touch events :( if (Modernizr.touch || navigator.userAgent.match(/Windows Phone/i)) { $(document).on('click.fndtn touchstart.fndtn', '.nav-bar a.flyout-toggle', function (e) { e.preventDefault(); var flyout = $(this).siblings('.flyout').first(); if (lockNavBar === false) { $('.nav-bar .flyout').not(flyout).slideUp(500); flyout.slideToggle(500, function () { lockNavBar = false; }); } lockNavBar = true; }); $('.nav-bar>li.has-flyout', this).addClass('is-touch'); } else { $('.nav-bar>li.has-flyout', this).on('mouseenter mouseleave', function (e) { if (e.type == 'mouseenter') { $('.nav-bar').find('.flyout').hide(); $(this).children('.flyout').show(); } if (e.type == 'mouseleave') { var flyout = $(this).children('.flyout'), inputs = flyout.find('input'), hasFocus = function (inputs) { var focus; if (inputs.length > 0) { inputs.each(function () { if ($(this).is(":focus")) { focus = true; } }); return focus; } return false; }; if (!hasFocus(inputs)) { $(this).children('.flyout').hide(); } } }); } }; })( jQuery, this );,javascript,jquery,fancybox,zurb-foundation,fancybox-2,Javascript,Jquery,Fancybox,Zurb Foundation,Fancybox 2,以下是fancybox网站的链接,因为我无法在此处发布javascript: 我真的不知道他们为什么会发生冲突 任何帮助都将非常感谢。您不必发布插件的脚本,只需发布自己的初始化代码、指向问题页面的链接或重现问题的JSFIDLE。我打赌这些插件之间没有冲突,但是在你实现它们的方式上。谢谢你的回复。问题是我调用jquery两次。一旦我移除了一个,它就工作得很好。

以下是fancybox网站的链接,因为我无法在此处发布javascript:

我真的不知道他们为什么会发生冲突


任何帮助都将非常感谢。

您不必发布插件的脚本,只需发布自己的初始化代码、指向问题页面的链接或重现问题的JSFIDLE。我打赌这些插件之间没有冲突,但是在你实现它们的方式上。谢谢你的回复。问题是我调用jquery两次。一旦我移除了一个,它就工作得很好。