如何在悬停时打开Kendo菜单,而不是点击? [英] How do I make a Kendo Menu open on hover, not on click?

查看:141
本文介绍了如何在悬停时打开Kendo菜单,而不是点击?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Kendo菜单作为我的主菜单,配置开始像

  @using Kendo.Mvc.UI 
@(Html.Kendo()。Menu()
.Name(main-menu)
.OpenOnClick(false)
.Items(items1 =>



找不到其他配置选项,我想让 OpenOnClick false使一些神奇的 OpenonHover true,我想要菜单项与孩子在悬停时打开,这样我可以摆脱父菜单项文本的右边的箭头,因为那里我之前没有成功地尝试过:before :after'伪选择器插入空格,到没有

解决方案

查看所有我可以插入的是一个文字在这个 jsfiddle 。FYI - 它使用jQuery,不使用 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 magical OpenonHover 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆