jquery themes not working
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
精彩评论