简体   繁体   English

Joomla搞砸了移动菜单

[英]Joomla's messing the mobile menu up

I have multiple issues with this practice site. 这个练习网站存在多个问题。 It worked perfectly fine on desktop until it was loaded on Joomla. 在将其加载到Joomla之前,它在台式机上运行良好。 Now the menu is always in open state and when I hide it, it hides itself on desktop and tablet too. 现在,菜单始终处于打开状态,当我将其隐藏时,它也将自身隐藏在台式机和平板电脑上。 Boo.

Here's the link to the site: http://dgm3740.inkedkeyboard.com/joomla/ 这是该网站的链接: http : //dgm3740.inkedkeyboard.com/joomla/

And here's the js script I've been using: 这是我一直在使用的js脚本:

$(document).ready(function() {
    //$(function(){
        $('#showPhoneNav').click(function() {
            $(".primary-nav").slideToggle('normal', function(){ //Shows Nav area
                if ($('.primary-nav').is(':visible')) {
                    $('#showPhoneNav').text('Hide Menu');
                } else {
                    $('#showPhoneNav').empty();
                    $('#showPhoneNav:first-child').append('<img src="http://dgm3740.inkedkeyboard.com/joomla/templates/varyastemplate/img/menuIcon.png" alt="navigation icon" />');
                } //end of if
            }); //end of slidetoggle
        }); //end of myNav
    //}); //end showPhoneNav
}); //end of ready

Checking the URL you provided shows the following basic Javascript error: 检查您提供的URL显示以下基本Javascript错误:

TypeError: 'undefined' is not a function (evaluating '$('#main-slider').flexslider({
        animation:      "slide",
        slideshowSpeed: 4000, 
        animationSpeed: 300
    })')

A quick check of the page shows that main-slider is not found anywhere in the html, did you remove it after posting the question? 快速浏览页面表明在html的任何位置都找不到main-slider ,您在发布问题后将其删除了吗?

Alternatively, looking at the headers for that page I can also see that you have both jQuery and Mootools loaded: 另外,查看该页面的标题,我还可以看到您同时加载了jQueryMootools

<script src="/joomla/media/jui/js/jquery.min.js" type="text/javascript"></script>
...
<script src="/joomla/media/system/js/mootools-core.js" type="text/javascript"></script>

It could be a conflict between the two (possibly but unlikely) without the main-slider element on the page it's hard to resolve the issue further. 如果页面上没有main-slider元素,这可能是两者之间的冲突(可能但不太可能),因此很难进一步解决该问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM