2 * This function is useful for pages which use the jquery-ui tabs functionality.
4 * Use is simple. Specify a selector of an <a> element which has an href
5 * attribute, and this function will ensure that its contents are loaded inside
6 * the current panel using ajax.
8 function init_ajax_tab_handler(event, ui, selector) {
9 var panel = $("#" + ui.panel.id);
10 panel.delegate(selector, "click", function(e) {
12 // Ajax url on the link being clicked
13 var url = $(this).attr("href");
14 // Replace 'selectors' contents with the ajax response.