jQuery UI 1.8.17和selectmenu [英] jQuery UI 1.8.17 and selectmenu
问题描述
这个问题的答案可能会给我一个哦!"片刻,但是我在哪里可以找到可以与较晚的(jquery)ui ui版本一起使用的selectmenu插件呢?
IV在所有这些地方都尝试过,但似乎都没有效果:
http://www.filamentgroup.com/lab/jquery_ui_selectmenu_an_aria_accessible_plugin_for_sty_styling >
https://github.com/fnagel/jquery-ui http://view.jqueryui.com/selectmenu/demos/selectmenu/default.html 如果您认为其中任何一个都可以使用,请向我指出正确的方向,以便我可以调查为什么它对我不起作用. 我遇到了同样的问题.但是现在我解决了: 1)从以下位置获取JavaScript-Selectmenu源代码:
http://view.jqueryui.com/selectmenu/demos/selectmenu/default.html 它是jQuery UI 1.9的一个版本.
因此,由于1.8.17不知道_super,请将_super更改为旧的: //this._super(key,value); 在功能"drawmenu"中,将"select"更改为"selected". 2)从1.9m5(从1.9m6开始的_delay)以下功能增强jquery.ui.widget.js:
_bind,_delay. 添加"this.bindings = $();"到_createWidget. 添加"this.bindings.unbind(." + this.widgetName);摧毁. 3)将此CSS包括在内: 4)jQuery UI 1.8.17具有菜单小部件.这是自动完成的一部分.从那里解压缩并将其放入新文件. 希望这会有所帮助 The answer to this question will probably give me a "doh!" moment, but where can I find a working selectmenu plugin that work with a late(ish) jquery ui version? Iv tried from all of these places, but none seem to work: https://github.com/fnagel/jquery-ui http://view.jqueryui.com/selectmenu/demos/selectmenu/default.html If you believe any of them should work, please point me in the right direction so that I may be able to investigate why it doesnt work for me. I had the same problems. But now I solved it: 1) Take the JavaScript-Selectmenu Source-Code from:
http://view.jqueryui.com/selectmenu/demos/selectmenu/default.html It is a version from jQuery UI 1.9.
So because 1.8.17 does not know _super, change _super to the old one: //this._super( key, value ); In the function "drawmenu" change "select" to "selected" 2) Enhance jquery.ui.widget.js with the following functions from 1.9m5 (_delay from 1.9m6):
_bind, _delay. add "this.bindings = $();" to _createWidget. add "this.bindings.unbind( "." + this.widgetName );" to destroy. 3) Take this css and include it: 4) jQuery UI 1.8.17 has a menu-Widget. It's part of the autocomplete. Extract it from there and put it in a new file. Hope this helps 这篇关于jQuery UI 1.8.17和selectmenu的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
$ .Widget.prototype._setOption.call(this,key,value);
(this.menu.menu({选择:)
.ui-selectmenu-menu {padding:0;边距:0;位置:绝对;最高:0;显示:无; }
.ui-selectmenu-menu .ui-menu .ui-menu-item a {padding:0.3em 1em 0.3em 1em; }
.ui-selectmenu-menu .ui-menu li.ui-state-disabled [padding:0.3em 1em 0.3em 1em; }
.ui-selectmenu-menu .ui-menu li.ui-selectmenu-optgroup {font-weight:bold;行高:1.5;填充:2px 0.4em;保证金:0.5em 0 0 0; }
.ui-selectmenu-open {display:block; }
.ui-selectmenu-button span.ui-icon {右:0.5em;左:自动; }
.ui-selectmenu-button span.ui-button-text {text-align:left;填充:0.4em 2.1em 0.4em 1em}
沃尔夫冈
$.Widget.prototype._setOption.call (this, key, value);
(this.menu.menu({ selected: )
.ui-selectmenu-menu { padding: 0; margin: 0; position:absolute; top: 0; display: none; }
.ui-selectmenu-menu .ui-menu .ui-menu-item a { padding: 0.3em 1em 0.3em 1em; }
.ui-selectmenu-menu .ui-menu li.ui-state-disabled { padding: 0.3em 1em 0.3em 1em; }
.ui-selectmenu-menu .ui-menu li.ui-selectmenu-optgroup { font-weight: bold; line-height: 1.5; padding: 2px 0.4em; margin: 0.5em 0 0 0; }
.ui-selectmenu-open { display: block; }
.ui-selectmenu-button span.ui-icon { right: 0.5em; left: auto; }
.ui-selectmenu-button span.ui-button-text { text-align: left; padding: 0.4em 2.1em 0.4em 1em }
Wolfgang