PDA

View Full Version : jQuery Gooey Menu is not showing up



alakbd
07-28-2011, 03:39 AM
Guys,
I am new in this forum and found this is an amazing site for learning web page development.Just got some problem with this "Gooey manu"
I found it on http://www.dynamicdrive.com/dynamicindex1/gooeymenu.htm. I tried that with my recent webpage here dublinawamileague.t35.com/Newspaperfontpage.htm.
If any one of you know about this pls help on this.



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>

<script src="gooeymenu.js">

/***********************************************
* Gooey Menu Script (c) Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

</script>

<link rel="stylesheet" type="text/css" href="gooeymenu.css" />

<style type="text/css">
<!--
body {
font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif;
background: #42413C;
margin: 0;
padding: 0;
color: #000;
}

/* ~~ Element/tag selectors ~~ */
ul, ol, dl { /* Due to variations between browsers, it's best practices to zero padding and margin on lists. For consistency, you can either specify the amounts you want here, or on the list items (LI, DT, DD) they contain. Remember that what you do here will cascade to the .nav list unless you write a more specific selector. */
padding: 0;
margin: 0;
}
h1, h2, h3, h4, h5, h6, p {
margin-top: 0; /* removing the top margin gets around an issue where margins can escape from their containing div. The remaining bottom margin will hold it away from any elements that follow. */
padding-right: 15px;
padding-left: 15px; /* adding the padding to the sides of the elements within the divs, instead of the divs themselves, gets rid of any box model math. A nested div with side padding can also be used as an alternate method. */
}
a img { /* this selector removes the default blue border displayed in some browsers around an image when it is surrounded by a link */
border: none;
}

/* ~~ Styling for your site's links must remain in this order - including the group of selectors that create the hover effect. ~~ */
a:link {
color: #42413C;
text-decoration: underline; /* unless you style your links to look extremely unique, it's best to provide underlines for quick visual identification */
}
a:visited {
color: #6E6C64;
text-decoration: underline;
}
a:hover, a:active, a:focus { /* this group of selectors will give a keyboard navigator the same hover experience as the person using a mouse. */
text-decoration: none;
}

/* ~~ This fixed width container surrounds all other divs ~~ */
.container {
width: 960px;
background: #FFFFFF;
margin: 0 auto; /* the auto value on the sides, coupled with the width, centers the layout */
}

/* ~~ The header is not given a width. It will extend the full width of your layout. It contains an image placeholder that should be replaced with your own linked logo. ~~ */
.header {
background: #ADB96E;
}

/* ~~ These are the columns for the layout. ~~

1) Padding is only placed on the top and/or bottom of the divs. The elements within these divs have padding on their sides. This saves you from any "box model math". Keep in mind, if you add any side padding or border to the div itself, it will be added to the width you define to create the *total* width. You may also choose to remove the padding on the element in the div and place a second div within it with no width and the padding necessary for your design.

2) No margin has been given to the columns since they are all floated. If you must add margin, avoid placing it on the side you're floating toward (for example: a right margin on a div set to float right). Many times, padding can be used instead. For divs where this rule must be broken, you should add a "display:inline" declaration to the div's rule to tame a bug where some versions of Internet Explorer double the margin.

3) Since classes can be used multiple times in a document (and an element can also have multiple classes applied), the columns have been assigned class names instead of IDs. For example, two sidebar divs could be stacked if necessary. These can very easily be changed to IDs if that's your preference, as long as you'll only be using them once per document.

4) If you prefer your nav on the right instead of the left, simply float these columns the opposite direction (all right instead of all left) and they'll render in reverse order. There's no need to move the divs around in the HTML source.

*/
.sidebar1 {
float: left;
width: 180px;
background: #EADCAE;
padding-bottom: 10px;
}
.content {

padding: 10px 0;
width: 600px;
float: left;
}
.sidebar2 {
float: left;
width: 180px;
background: #EADCAE;
padding: 10px 0;
}

/* ~~ This grouped selector gives the lists in the .content area space ~~ */
.content ul, .content ol {
padding: 0 15px 15px 40px; /* this padding mirrors the right padding in the headings and paragraph rule above. Padding was placed on the bottom for space between other elements on the lists and on the left to create the indention. These may be adjusted as you wish. */
}

/* ~~ The navigation list styles (can be removed if you choose to use a premade flyout menu like Spry) ~~ */
ul.nav {
list-style: none; /* this removes the list marker */
border-top: 1px solid #666; /* this creates the top border for the links - all others are placed using a bottom border on the LI */
margin-bottom: 15px; /* this creates the space between the navigation on the content below */
}
ul.nav li {
border-bottom: 1px solid #666; /* this creates the button separation */
}
ul.nav a, ul.nav a:visited { /* grouping these selectors makes sure that your links retain their button look even after being visited */
padding: 5px 5px 5px 15px;
display: block; /* this gives the anchor block properties so it fills out the whole LI that contains it so that the entire area reacts to a mouse click. */
width: 160px; /*this width makes the entire button clickable for IE6. If you don't need to support IE6, it can be removed. Calculate the proper width by subtracting the padding on this link from the width of your sidebar container. */
text-decoration: none;
background: #C6D580;
}
ul.nav a:hover, ul.nav a:active, ul.nav a:focus { /* this changes the background and text color for both mouse and keyboard navigators */
background: #ADB96E;
color: #FFF;
}

/* ~~ The footer styles ~~ */
.footer {
padding: 10px 0;
background: #CCC49F;
position: relative;/* this gives IE6 hasLayout to properly clear */
clear: both; /* this clear property forces the .container to understand where the columns end and contain them */
}

/* ~~ Miscellaneous float/clear classes ~~ */
.fltrt { /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
float: right;
margin-left: 8px;
}
.fltlft { /* this class can be used to float an element left in your page. The floated element must precede the element it should be next to on the page. */
float: left;
margin-right: 8px;
}
.clearfloat { /* this class can be placed on a <br /> or empty div as the final element following the last floated div (within the .container) if the .footer is removed or taken out of the .container */
clear:both;
height:0;
font-size: 1px;
line-height: 0px;
}
-->
</style>
<script src="file:///C|/Users/Alak Sarker/AppData/Roaming/Adobe/Dreamweaver CS5.5/en_US/Configuration/Temp/Assets/eamB186.tmp/SpryMenuBar.js" type="text/javascript"></script>
<link href="file:///C|/Users/Alak Sarker/AppData/Roaming/Adobe/Dreamweaver CS5.5/en_US/Configuration/Temp/Assets/eamB186.tmp/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
</head>

<body><!-- T35 Hosting Ad Code Begin -->
<style type="text/css">
#t35ad{font: 14px arial,helvetica; text-decoration: none; line-height:1.5em; text-align: center; }
#t35ad a{font: 14px arial,helvetica; text-decoration: none; }
#t35ad a:hover{background-color: black; color: white; font-size:medium; font-weight: bold; }
#t35ad ul{display: inline; list-style-type: none; padding: 0;}
#navlist li{display: inline; list-style-type: none; padding-right: 0px; padding-left: 0px; padding: 0;}
</style>
<!-- T35 Hosting Ad Code End -->


<div class="container">
<div class="header"><!-- end .header -->
<p align="center">
<img border="0" src="banglabarta.jpg" width="642" height="87"></p>
<table border="1" width="100%" height="40">
<tr>
<td align="center">
<ul id="gooeymenu1" class="gelbuttonmenu">
<li><a href="http://www.dynamicdrive.com/">Home</a></li> |
<li>&nbsp;&nbsp;&nbsp; <a href="http://www.dynamicdrive.com/style/">
First Page</a></li> |
<li>&nbsp;&nbsp; <a href="http://www.dynamicdrive.com/forums/">
Community News</a></li> |
<li>&nbsp;&nbsp; <a href="http://tools.dynamicdrive.com">Sports</a> |&nbsp;&nbsp;
<a href="http://www.javascriptkit.com/">Last Page</a> </li> &nbsp;|
<li>&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://www.cssdrive.com">&nbsp;Gallery</a></li>
</ul>
<script>
gooeymenu.setup({id:'gooeymenu1', selectitem:1})
</script>
</td>
</tr>
</table>
</div>
Thanks & Regards,
alak

jscheuer1
07-28-2011, 02:03 PM
Are you trying to use this with the SpryMenuBar?


If not get rid of:


<script src="file:///C|/Users/Alak Sarker/AppData/Roaming/Adobe/Dreamweaver CS5.5/en_US/Configuration/Temp/Assets/eamB186.tmp/SpryMenuBar.js" type="text/javascript"></script>

<link href="file:///C|/Users/Alak Sarker/AppData/Roaming/Adobe/Dreamweaver CS5.5/en_US/Configuration/Temp/Assets/eamB186.tmp/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />

and:


<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
var MenuBar2 = new Spry.Widget.MenuBar("MenuBar2", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});

</script>

Get rid of those anyway, and see what happens. I say to get rid of them because the first code block points locations on the local hard drive so is messing up the live page. If we want to bring the SpryMenuBar back later we can try, but those files must then be hosted on the server and those first two tags should point to them, not the local hard drive.

alakbd
07-28-2011, 07:55 PM
Hi john,
Thanks very much for reply.I have removed those lines as you said but stil it doesnt work.

jscheuer1
07-28-2011, 11:53 PM
They're still there on dublinawamileague.t35.com/Newspaperfontpage.htm and they're messing with my developer's tools, making it hard to diagnose the page. They will have to be removed or fixed as I mentioned before anyway.

But I just noticed that the Gooey Menu is working! It's just that the Gel Button is behind the other menu, or the other menu styles for the Gooey Menu.

In any case, and this varies by browser, adding to the gooeymenu.css file like so (addition highlighted):


hr{
margin:50px 0;
color:#eee;
}

ul li.active{ /*IE6 hack- hide gooey effect from that browser*/
_visibility: hidden; /*IE6 rule*/
}

/* ######### Gel Menu CSS ######### */

ul.gelbuttonmenu{
z-index: 2;
position:relative;
padding: 0;
margin: 0;
margin-bottom:1em;
text-align: center; //set value to "left", "center", or "right"*/
}

ul.gelbuttonmenu li{
display: inline;
}

ul.gelbuttonmenu li a{
color: black;
font-weight:bold;
padding: 10px; /*make sure . . .

takes care of it in Firefox and IE 9. But there's probably tweaking left to do. In IE < 9 (actually IE 9 in IE 8 or IE 7 mode) the Gel Button still doesn't show up, but there's a Gooey highlight that replaces it. Actually looks better with the rest of the page than the Gel Button does.

alakbd
07-29-2011, 02:03 AM
Hi John,
Thanks again.It works in my computer when I use Goggle chroome or also with IE9 when I open with but when put it on website gooey manu doesnt come out.As you can see here now dublinawamileague.t35.com/Newspaperfontpage.htm. This is my gooeymanue.css.
I just didnt get it what its wrong with website.In website its simply just hide again.


hr{
margin:50px 0;
color:#eee;
}

ul li.active{ /*IE6 hack- hide gooey effect from that browser*/
_visibility: hidden; /*IE6 rule*/
}

/* ######### Gel Menu CSS ######### */

ul.gelbuttonmenu{
z-index: 2;
position:relative;
padding: 0;
margin: 0;
margin-bottom:1em;
text-align: center; //set value to "left", "center", or "right"*/
}

ul.gelbuttonmenu li{
display: inline;
}

ul.gelbuttonmenu li a{
color: black;
font-weight:bold;
padding: 10px; /**make sure padding is sufficient that the height of the link is enough to fully show the gel button*/
margin-right: 20px; /*spacing between each menu link*/
text-decoration: none;
}

ul.gelbuttonmenu li.active{ /*style of LI that gets dynamically added to menu to create background effect*/
position:absolute;
width:0;
background:lightblue;
background:url(gelbuttonleft.gif) top left no-repeat, url(gelbuttonright.gif) top right no-repeat, url(gelbuttoncenter.gif) top center repeat-x;
}

In my computer it ask for run script or Active x and when I allow it shows me the Gooeymanu.In a website it doesnt ask for anything like that and gooey manu hide behind the page.

jscheuer1
07-29-2011, 03:50 AM
It's working fine here now on the dublinawamileague.t35.com/Newspaperfontpage.htm page. Probably just clear your cache or refresh the page to get it to work for you live.

Oh, and that Active X warning only ever comes for ordinary javascript like this on local pages.

alakbd
07-29-2011, 02:26 PM
Hi John,Thanks very much for your effort.Its working now.