开发者

jquery themes not working

开发者 https://www.devze.com 2023-02-16 12:09 出处:网络
Any idea why jquery ui theme is not working in jsfiddle, but it works on my localhost? http://jsfiddle.net/oshirowanen/Uxva开发者_如何学PythonG/The JS expects a portlet class, while the HTML uses the

Any idea why jquery ui theme is not working in jsfiddle, but it works on my localhost?

http://jsfiddle.net/oshirowanen/Uxva开发者_如何学PythonG/


The JS expects a portlet class, while the HTML uses the widget class.


Remove $(document).load wrapper or chage to nowrap from drop down at left. 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();

If you select onLoad on the left corner where you select lib, then jsfiddle will automatically wrap the code inside $(document).load({})


u must missing some CSS, use ThemeROller

Download a ThemeRoller theme: The easiest way to build a theme is to use the ThemeRoller to generate and download a theme. This app will create a new ui.theme.css file and and images directory containing all necessary background images and icon sprites which can simply be dropped into your project. This approach will be the easiest to create and maintain but limits customization to the options provided in ThemeRoller

reference

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号