PDA

View Full Version : Menu works fine except on home page in Chrome or Opera



skitog
09-23-2016, 05:56 AM
1) Script Title: ddsmoothmenu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/ddsmoothmenu.htm

3) Describe problem: I am using this script on our Web site (http://www.skitog.com) and it works beautifully in Firefox and IE. It works in my computer fine on Google Chrome as well. However, on some computers, it fails to show menu items directing to second level on the home page only. The identical script also runs on all other pages of the site without problem. What would cause these menu items (those lines directing to a second level menu) to disappear only on one page of a site (home page) and only in Chrome or Opera? And, how would this quirk be fixed? Thanks for any help offered.

styxlawyer
09-23-2016, 01:13 PM
The first thing I noticed was that you are including two different jQuery libraries in the Home page (lines 14 & 36). There is only one inclusion in all the other pages (line 13).

jscheuer1
09-23-2016, 02:01 PM
Right, two problems. There's a conflict with the other two scripts using other versions of jQuery on the page. But also, the script is falsely detecting a touch browser in Opera and Chrome. If it did not, there would not be the conflict. This was supposed to be fixed in the latest version. Apparently either it wasn't actually fixed, or Chrome and Opera have become more sensitive yet again. In any case, here's an updated version that works:

5956

But, since on real touch devices there may still be a problem, I would also recommend getting rid of all the files for the other scripts from the page (remove):


<script src="facefiles/jquery-1.2.2.pack.js" type="text/javascript"></script>
<link href="facefiles/facebox.css" media="screen" rel="stylesheet" type="text/css" />
<script src="facefiles/facebox.js" type="text/javascript"></script>

<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox()
})

</script>

<script type="text/javascript" <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>

<script type="text/javascript" src="Goggle/picfader1.js"></script>

They're not used anyway. So the head of the page will look like so:


<head>
<title>Toggenburg Mountain Winter Sports Center</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="keywords" content="Toggenburg, Central New York skiing, skiing, boarding, winter sports, Central New York, Fabius, Toggenburg Winter Sports Center, winter sports, hillclimb, Foggy Goggle, ski areas, Central New York ski areas, Tog, Ski Tog, skitog, snow sports, CNY sports, CNY winter sports, CNY ski areas, CNY ski resorts, ski resorts, New York State ski areas, New York State ski resorts" />
<base href="http://www.skitog.com/" />
<link href="togg.css" rel="stylesheet" type="text/css" />
<LINK REL="SHORTCUT ICON" HREF="http://skitog.com/tog.ico">

<link rel="stylesheet" type="text/css" href="includes/ddsmoothmenu.css" />
<link rel="stylesheet" type="text/css" href="includes/ddsmoothmenu-v.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<script type="text/javascript" src="includes/ddsmoothmenu.js">

/***********************************************
* Smooth Navigational Menu- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Please keep this notice intact
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

</script>
</head>

skitog
09-24-2016, 02:06 AM
Thank you for your assistance. This is also part of what moderator John noted as well.

skitog
09-24-2016, 02:09 AM
John: Thank you for sorting this out. I have applied your suggestions and it seems to have corrected the problem.