问题标签 [submenu]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
650 浏览

android - android子菜单标题图标

我是安卓新手。

我现在正在学习制作菜单和子菜单,但偶然发现了一个问题。

我想更改 xml 中的子菜单标题图标,但不知道如何更改。

我尝试以编程方式更改标题图标,但没有获取子菜单的方法(仅添加子菜单)。

是否可以更改xml中的标题图标?我看到了以编程方式添加子菜单并在那里更改标题的代码。在 xml 中制作子菜单很奇怪吗?

谢谢。

编辑:为什么我不能在第一句话中输入“嗨”?

0 投票
1 回答
1030 浏览

java - Java 子菜单 ActionListener 无法正常工作

我使用以下代码将右键单击子菜单添加到我的程序中,

而编辑描边方法是

但是当我编译并右键单击某处时,只有“1 px”链接有效,当我单击其他链接时,没有任何反应。更重要的是,当我点击“1 px”时,输出是

1 像素 1 像素 1 像素

我应该如何解决这个问题?

谢谢。

0 投票
0 回答
417 浏览

internet-explorer-9 - IE9 not showing ul li ul submenu all other browsers IE before do

i did not find exactly this problem in the other questions

only in IE9 my submenu and all css on ul li ul does not show . It works correctly in IE6 7 8, firefox , safari, chrome, opera,..

so i have a part of css like this : ...

nav ul li:hover {text-decoration:underline; color:green;}

nav ul li a:hover {text-decoration:underline;color:red;}

... my menu (list) goes like this : "..

  • menu choise 1
  • submenu title
    • Submenu choise 1

"..

i have the red color bur nor the green !! and the real problem is that i don't see the submenu!!

thanks for helping,

Ber lingo

0 投票
1 回答
1394 浏览

css - 右对齐 Superfish 菜单 - 并阻止它跳来跳去

当父项扩展以适应其子项时,我真的很想停止在此站点上跳来跳去的菜单项。

当我添加这个 CSS 时,我可以让它看起来像我想要的那样,强制菜单项具有固定的宽度:

然而,这显然并不理想,因为菜单需要是动态的......

有没有办法通过 CSS 实现我想要的?但愿如此!

我正在使用Theme Hybrid for Wordpress 附带的 Superfish 菜单。

提前感谢您提供的任何帮助!

0 投票
2 回答
4142 浏览

css - 使用css在父级下方居中水平子菜单

最好用小提琴展示:http: //jsfiddle.net/Jnttm/

如何让子菜单在父菜单项下方居中?我发现的许多居中技巧都不适用,因为子元素比父元素宽。

纯CSS可以做到这一点还是我必须求助于javascript?
如果需要 JS,是否有人有方便的 JQuery 代码来执行此操作?

0 投票
1 回答
368 浏览

model-view-controller - 单击水平主菜单时在页面左侧显示子菜单

在我的 Asp.net mvc 应用程序中,我试图创建一个显示在页面左侧的子菜单,同时单击顶部的水平主菜单。我试过这个链接,但它没有多大帮助:http: //msdn.microsoft.com/en-us/library/16yk5dby.aspx。有人可以提出答案吗?

0 投票
1 回答
2635 浏览

jquery - jquery水平子菜单在菜单点击时保持打开状态

也许这是一个相关的问题,但我找不到一个好的解决方案,所以这是我的问题。我有一个带有一些子项的水平菜单。在我点击主菜单的那一刻,子菜单正在显示,即使我点击页面上的任何地方,它仍然保持打开状态。但这是棘手的部分,当我单击菜单项(在子菜单中)时,我希望子菜单显示页面所在的项目。例如,菜单如下所示:home、page1、page2 和子菜单(page1):page1a、page1b。因此,当我单击 page1 时,会打开带有 page1a 和 page1b 的子菜单,但是当我单击 page1a 时,会打开 page1a 的页面,但子菜单仍然关闭,而我希望它显示 page1 的子菜单。这是我的 html 菜单:

打开子菜单的 jquery:

和菜单的CSS:

我希望你们能帮助我解决这个问题。

谢谢

0 投票
1 回答
279 浏览

jquery - 多个页面网站上的相同页面子导航

我正在尝试更改<li>子菜单中包含的锚点的 CSS。这是 HTML:

每个部分都有一个 1060px 的宽度,一个左浮动,所有的部分都包含在一个隐藏溢出的 div 容器中。这是我尝试过的脚本:

当我留在同一页面上时,此脚本工作正常。但是,即,当我在第 1 页并单击位于第 2 页中的链接时,即使我单击了另一个孩子,第一个孩子的 css 也会更改。我的错误在哪里?

你可以在这里看到发生了什么http://www.theworkingowl.com

0 投票
1 回答
723 浏览

joomla - 在 Joomla 1.7 中向菜单子项添加子菜单

我想在 Joomla 1.7 的菜单子项中添加一个子菜单。例子:

在主菜单上,我打开了 Intitutes 链接,在该链接下我打开了 First Institute,它在页面的其他地方弹出了另一个名为 [First Institute submenu] 的子菜单。现在,当我在子菜单上导航时,第一个菜单保持不变并链接粗体。我该怎么做呢?

0 投票
3 回答
177 浏览

php - Curious... PHP pages rendered HTML flyout menu inactive?

I have tried searching the database for a similar issue, but was unsuccessful in finding anything remotely close. I just noticed that the sub menu items on two pages on a site I am creating that use php or are php have stopped working. Nothing was changed on the menu items as they are library items that have not been detached from the original.

Instead of attaching the entire code for both pages (as they are quite long), I figured I would first provide a link to the testing server that the two pages in question are hosted on: (1) http://2142.sandbox.i3dthemes.net/apply_now.php and (2) http://2142.sandbox.i3dthemes.net/contact_us.htm.

If you think you know what is happening here, I would be very curious to know what it is and how to correct the issue (if there is a way to).

Any help would be appreciated. If you need to see the entire page source to figure this out, just let me know and I will edit the post to include it.

Thank you in advance.

PROBLEM SOLVED:

Okay, so the solution that solved my problem was to do some additional troubleshooting. I had initially assumed the problem was only with the pages containing php, however I discovered that other html pages were also affected. So, I used one of the properly working pages and copied it as a test template. I used that template to copy paste my php code into and - voila - the menus worked again!

Just goes to show how easy it is to accidentally delete a closing div tag which is what I think I may have done.

Thanks to everyone for their help.