Is there a project (open source) that takes the widgets and plugins for jQuery UI but allows us to use them without setting up any HTML?
Kinda like Ext-js and Sprout
As "Mr. Shiny and New" pointed out the following code would work:
$('body').append($('
However the style you are looking for can be accieved by using the appendTo() function:
$('')
.button({
label: "Hello world!",
}).click(function () {
//doSomething
}).appendTo('#test');
Furthermore the code above returns the "button" object which allows you to assign the object to a variable for future reuse:
// set up the button
var a = $('').button({
label: 'Hello world!'
}).offset({
top: 80,
left: 120
}).width(180).height(24)
.click(function () {
// dosomething
}).appendTo('body');
// hide then show and rename (if it takes your fancy)
a.hide(300, function () {
a.show(300, function () {
a.button( "option" , {
label: 'Hello to the world again!'
});
});
});