javascript - 这是什么 JQuery 脚本?

标签 javascript jquery html css templates

http://jqueryui.com/demos/autocomplete/#combobox

在右侧,有选择器选项卡(选中的箭头指向左侧)

这是什么 CSS 菜单?为什么我在 JQuery UI 网站上找不到它?

最佳答案

这不是插件,它只是页面上的一小段 html/css/javascript。

控制菜单的javascript在http://jqueryui.com/js/demos.js中.

具体部分:

//Rewrite and prepare links of right-hand sub navigation
    $('#demo-config-menu a').each(function() {
        $(this).attr('target', 'demo-frame');
        $(this).click(function(e) {

            resetDemos();
            $(this).parents('ul').find('li').removeClass('demo-config-on');
            $(this).parent().addClass('demo-config-on');

            //Set the hash to the actual page without ".html"
            window.location.hash = this.getAttribute('href').match((/\/([^\/\\]+)\.html/))[1];

            loadDemo(this.getAttribute('href'));
            e.preventDefault();

        });
    });

关于javascript - 这是什么 JQuery 脚本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4295358/

相关文章:

javascript - 在 html5 canvas 中绘制 youtube

jquery - 为什么这在 IE8 中不起作用?

jquery - Zebra 表排序器在初始排序时不会出现条纹

html - 列数多时表换行

javascript - 循环 slider 动画

javascript - 网络驱动程序错误 : unable to set cookie javascript

javascript - 尝试使用 outerWidth() 和 $(window).resize() 水平居中动态宽度元素时出现意外行为

javascript - 如何在不每次都搜索单选组的情况下使用 jQuery 找出选择了哪个单选按钮?

javascript - 如何使用 jquery/javascript 从 ontextchanged 事件获取文本框值

html - 输入搜索,如何禁用 'clear' X按钮