如何在悬停时打开Kendo菜单,而不是点击? [英] How do I make a Kendo Menu open on hover, not on click?
问题描述
我有一个Kendo菜单作为我的主菜单,配置开始像
@using Kendo.Mvc.UI
在这个 jsfiddle 。FYI - 它使用jQuery,不使用
@(Html.Kendo()。Menu()
.Name(main-menu)
.OpenOnClick(false)
.Items(items1 =>
找不到其他配置选项,我想让
OpenOnClick
false使一些神奇的OpenonHover
true,我想要菜单项与孩子在悬停时打开,这样我可以摆脱父菜单项文本的右边的箭头,因为那里我之前没有成功地尝试过:before
和:after'伪选择器插入空格,到没有
解决方案查看所有我可以插入的是一个文字
Html helper
。希望对您有帮助。
您可以在悬停时打开菜单。
I have a Kendo menu as my main menu, with config starting like
@using Kendo.Mvc.UI @(Html.Kendo().Menu() .Name("main-menu") .OpenOnClick(false) .Items(items1 =>
Finding no other config option, I thought making
OpenOnClick
false would make some magicalOpenonHover
true. I want menu items with children to open on hover so that I can get rid of the arrow to the right of the parent menu item text, as there is absolutely no spacing between the arrow and the tick. I have unsuccessfully tried the:before
and:after' pseudo-selectors to insert space, to no avail. All I could get inserted was a literal
" hehe.解决方案Take a look at this jsfiddle. FYI-it's using jQuery, not using
Html helper
. Hope it's helpful to you.You can open menu on hover.
这篇关于如何在悬停时打开Kendo菜单,而不是点击?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!