您好尝试安装选择的 Jquery 插件,这使我能够<select>
在所有浏览器中自定义我的标签。单击此处无论如何,我已将此插件集成到我的站点中,并且在我的元素检查器中遇到以下错误消息..单击此处
“TypeError: Object # has no method ‘observe’”
从以下代码
<script type="text/javascript">
document.observe('dom:loaded', function(evt) {
var select, selects, _i, _len, _results;
if (Prototype.Browser.IE && (Prototype.BrowserFeatures['Version'] === 6 || Prototype.BrowserFeatures['Version'] === 7)) {
return;
}
selects = $$(".chzn-select");
_results = [];
for (_i = 0, _len = selects.length; _i < _len; _i++) {
select = selects[_i];
_results.push(new Chosen(select));
}
deselects = $$(".chzn-select-deselect");
for (_i = 0, _len = deselects.length; _i < _len; _i++) {
select = deselects[_i];
_results.push(new Chosen(select,{allow_single_deselect:true}));
}
return _results;
});
</script>
有谁知道我该如何解决这个问题?