0

知道为什么 jquery ui 主题在 jsfiddle 中不起作用,但它在我的本地主机上起作用吗?

http://jsfiddle.net/oshirowanen/UxvaG/

4

3 回答 3

2

JS 需要一个 portlet 类,而 HTML 使用小部件类。

于 2011-03-10T10:05:55.860 回答
0

从左侧的下拉列表中移除$(document).loadwrapper 或 chage 为nowrap 。http://jsfiddle.net/UxvaG/1/

        $( ".column" ).sortable({
            connectWith: ".column"
        });

        $( ".portlet" ).addClass( "ui-widget ui-widget-content ui-helper-clearfix ui-corner-all" )
            .find( ".portlet-header" )
                .addClass( "ui-widget-header ui-corner-all" )
                .prepend( "<span class='ui-icon ui-icon-minusthick'></span>")
                .end()
            .find( ".portlet-content" );

        $( ".portlet-header .ui-icon" ).click(function() {
            $( this ).toggleClass( "ui-icon-minusthick" ).toggleClass( "ui-icon-plusthick" );
            $( this ).parents( ".portlet:first" ).find( ".portlet-content" ).toggle();
        });

        $( ".column" ).disableSelection();

如果onLoad在左边选择lib的地方选择,那么jsfiddle会自动将代码包裹在里面$(document).load({})

于 2011-03-10T10:06:03.793 回答
0

你必须缺少一些 CSS,使用 ThemeROller

下载 ThemeRoller 主题:构建主题最简单的方法是使用 ThemeRoller 生成和下载主题。这个应用程序将创建一个新的 ui.theme.css 文件和 images 目录,其中包含所有必要的背景图像和图标精灵,它们可以简单地拖放到您的项目中。这种方法最容易创建和维护,但限制了 ThemeRoller 中提供的选项的自定义

参考

于 2011-03-10T10:08:36.483 回答