I have a website with jQuery and jQuery UI. I have a Javascript function:
function ToButton()
{
$(".ToButton").button();
}
This function runing after the page load and change all elements with class "ToButton".
Also I change HTML code when user press a button. E.g.:
$("body").append('<span class="ToButton">Test Button</span>');
And I want to run ToButton function to this new element too, but live or delegate methods in jQuery don't have "show" or "create" event type. So I need call function ToButton() after all HTML code changes.
Can you help me, how I can delegate ToButton function to all elements?