At http://docs.jquery.com/UI/Tabs#demo i found below description about create event on tab wizard. To me look like both ways attach the callback function with create event. But i am sure there must be some difference in their usage. Is it first approach should be used at the time of creation tab and second one is applicable once tabs has been constructed?
//Approach 1
Supply a callback function to handle the create event as an init option.
$( ".selector" ).tabs({
create: function(event, ui) { ... }
});
//Approach 2
Bind to the create event by type: tabscreate.
$( ".selector" ).bind( "tabscreate", function(event, ui) {
...
});
No, they’re equivalent. They both enable you to run code when a tabs instance is created. I would say the first method is a little more common than the second. Although someone on the jQuery UI team needs to update the reference to the deprecated
.bind()function.