Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Sam E
jQuery dropdown menu bugs with Firefox.
August 25, 2009 11:43 PM
Answer

Sam E

Rank: Liferay Master

Posts: 660

Join Date: March 2, 2009

Recent Posts

Hi,

I use liferay 5.2.3 with jQuery 1.2.6 (default version).
I've been trying to use the simplest dropdown menu possible to isolate the bugs, but it turned out I couldn't resolve it.

Here is the bug I got , as attached in this post: The left hand side of the dropdown menu has little circles on each of the sub-menus.

The jspf code is shown as below:

 1
 2<link rel="stylesheet" type="text/css" href="<%= themeDisplay.getPathThemeImages() %>/shopping/files/ddsmooth/ddsmoothmenu.css" />
 3<script type="text/javascript" src="<%= themeDisplay.getPathThemeImages() %>/shopping/files/ddsmooth/ddsmoothmenu.js">
 4</script>
 5
 6<script type="text/javascript">
 7
 8ddsmoothmenu.init({
 9        mainmenuid: "smoothmenu1", //menu DIV id
10        orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
11        classname: 'ddsmoothmenu', //class added to menu's outer DIV
12        //customtheme: ["#1c5a80", "#18374a"],
13        contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
14})
15
16ddsmoothmenu.init({
17        mainmenuid: "smoothmenu2", //Menu DIV id
18        orientation: 'v', //Horizontal or vertical menu: Set to "h" or "v"
19        classname: 'ddsmoothmenu-v', //class added to menu's outer DIV
20        //customtheme: ["#804000", "#482400"],
21        contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
22})
23
24</script>
25
26
27<body>
28<h2>Example 1</h2>
29
30<div id="smoothmenu1" class="ddsmoothmenu">
31<ul>
32<li><a href="http://xxx.com">Item 1</a></li>
33<li><a href="#">Folder 0</a>
34  <ul>
35  <li><a href="#">Sub Item 1.1</a></li>
36  <li><a href="#">Sub Item 1.2</a></li>
37  <li><a href="#">Sub Item 1.3</a></li>
38  <li><a href="#">Sub Item 1.4</a></li>
39  <li><a href="#">Sub Item 1.2</a></li>
40  <li><a href="#">Sub Item 1.3</a></li>
41  <li><a href="#">Sub Item 1.4</a></li>
42  </ul>
43</li>
44</ul>
45</div>
46</body>


If I move the code to an Apache server with a standalone jQuery1.2.6 file without liferay, it does not have this "bug".
If you guys have came across the same problem and have solved it, please post your suggestion here.
I am desperate seek for help.

Thanks
Sam
Attachment

Attachments: dropdown-bugs.jpg (14.2k)
Anonymous
RE: jQuery dropdown menu bugs with Firefox.
September 2, 2009 12:42 AM
Answer

Anonymous

Hi Sam Wan,

There might be some dependencies with existing .js files in liferay please make sure that your functions are not related to the existing. If it is related you need to alter your function.


Thanks in Advance,

V.C.Vijayan
Software Developer, TransIT mPower Labs (P) Ltd.
info@mpowerglobal.com
mPower Global Inc.
A Liferay expert company.
Arun Kumar S
RE: jQuery dropdown menu bugs with Firefox.
September 2, 2009 5:10 AM
Answer

Arun Kumar S

Rank: Regular Member

Posts: 182

Join Date: June 23, 2008

Recent Posts

Hi Sam Wan ,


To remove little circles on each of the sub-menus.

Include the below lines in your CSS

ul li, ol ul li {
list-style-image:none;
list-style-position:outside;
list-style-type:none;
}



Thanks,
Arun.
Anonymous
RE: jQuery dropdown menu bugs with Firefox.
September 2, 2009 6:00 AM
Answer

Anonymous

Hi Sam Wan,

Mention like the following to avoid style.

#smoothmenu1 li{
list-style-type:none;
}

Always try to mention with id or class name.
Otherwise it will effect other list style also.



Thanks in Advance,

V.C.Vijayan
Software Developer, TransIT mPower Labs (P) Ltd.
info@mpowerglobal.com
mPower Global Inc.
A Liferay expert company.